|
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: Missed Alarm View Declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CALENMISSEDALARMSVIEW_H |
|
21 #define CALENMISSEDALARMSVIEW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <eiklbv.h> |
|
25 #include <aknview.h> |
|
26 #include <AiwCommon.h> |
|
27 #include <calennotificationhandler.h> |
|
28 #include <calentoolbar.h> // MCalenToolbarObserver |
|
29 |
|
30 // user includes |
|
31 #include "calennativeview.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CCalenMissedAlarmsContainer; |
|
35 class CAiwServiceHandler; |
|
36 class CAknButton; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * CCalenMissedAlarmsView class. |
|
42 * Derived from CAknView. |
|
43 */ |
|
44 NONSHARABLE_CLASS( CCalenMissedAlarmsView ) : public CCalenNativeView |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * @return CCalenMissedAlarmsView* |
|
51 */ |
|
52 IMPORT_C static CCalenMissedAlarmsView* NewL(MCalenServices& aServices); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CCalenMissedAlarmsView(); |
|
58 |
|
59 public: // From CCalenView |
|
60 |
|
61 /** |
|
62 * View population mechanism |
|
63 */ |
|
64 virtual TNextPopulationStep ActiveStepL(); |
|
65 |
|
66 /** |
|
67 * Cancel view population |
|
68 */ |
|
69 virtual void CancelPopulation(); |
|
70 |
|
71 /** |
|
72 * Returns view's cycle position |
|
73 */ |
|
74 virtual TCyclePosition CyclePosition() const; |
|
75 |
|
76 /** |
|
77 * Provides view name |
|
78 */ |
|
79 virtual const TDesC& LocalisedViewNameL(CCalenView::TViewName aViewName); |
|
80 |
|
81 /** |
|
82 * Returns view icon |
|
83 */ |
|
84 virtual CGulIcon* CCalenMissedAlarmsView::ViewIconL() const; |
|
85 |
|
86 protected: // From CCalenNativeView |
|
87 |
|
88 /** |
|
89 * Clear view specific data |
|
90 */ |
|
91 virtual void ClearViewSpecificDataL(); |
|
92 |
|
93 private: |
|
94 |
|
95 /** |
|
96 * second phase construction |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 /** |
|
101 * C++ constructor. |
|
102 */ |
|
103 CCalenMissedAlarmsView(MCalenServices& aServices); |
|
104 |
|
105 protected: |
|
106 |
|
107 /** |
|
108 * From CCalenView Second phase DoActivateL |
|
109 */ |
|
110 void DoActivateImplL( const TVwsViewId& aPrevViewId, |
|
111 TUid aCustomMessageId, |
|
112 const TDesC8& aCustomMessage ); |
|
113 |
|
114 /** |
|
115 * From CCalenView Second phase DoDeactivate |
|
116 */ |
|
117 void DoDeactivateImpl(); |
|
118 |
|
119 /** |
|
120 * From CCalenView. Called when locale was changed and |
|
121 * time was crossed over |
|
122 */ |
|
123 void OnLocaleChangedL(TInt aReason); |
|
124 |
|
125 public: // From CCalenView |
|
126 |
|
127 /** |
|
128 * Redraw status pane when Form is closed |
|
129 */ |
|
130 void RedrawStatusPaneL(); |
|
131 |
|
132 /** |
|
133 * From CCalenView Creates CCalenContainer |
|
134 **/ |
|
135 CCalenContainer* CreateContainerImplL(); |
|
136 |
|
137 /** |
|
138 * From CCalenView. Normal command handling method. |
|
139 * needed for MSK. |
|
140 */ |
|
141 void HandleCommandL(TInt aCommand); |
|
142 |
|
143 private: |
|
144 |
|
145 /** |
|
146 * Return UID of CCalenMissedAlarmsView |
|
147 * @return UID of CCalenMissedAlarmsView, KCalenMissedAlarmsView |
|
148 */ |
|
149 TUid Id() const; |
|
150 |
|
151 /** |
|
152 * From MEikMenuObserver, Delete meaningless menu item. |
|
153 * @param aResourceId : resource ID of menu pane |
|
154 * @param aMenuPane : Pointer of menu pane object |
|
155 */ |
|
156 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
157 |
|
158 /** |
|
159 * Returns pointer to the missed alarm container |
|
160 * @return CCalenMissedAlarmsContainer* |
|
161 */ |
|
162 CCalenMissedAlarmsContainer* Container(); |
|
163 |
|
164 /** |
|
165 * Updates the cba based on the missed alarm entries |
|
166 */ |
|
167 void UpdateCbaL(); |
|
168 |
|
169 private: |
|
170 /** |
|
171 * Create missed alarms view toolbar buttons |
|
172 * @ aIcon Icon of the toolbar button |
|
173 * @ aText Text to be displayed on toolbar item |
|
174 * @ aTooltipID Tool tip Id of the toolbar button |
|
175 * @ aToolbar refrence to the calendar toolbar |
|
176 */ |
|
177 CAknButton* CreateButtonL( CGulIcon* aIcon, |
|
178 const TDesC& aText, |
|
179 TInt aTooltipID, |
|
180 CAknToolbar& aToolbar ); |
|
181 |
|
182 /** |
|
183 * Remove missed alarms view's toolbar buttons |
|
184 */ |
|
185 void RemoveToolbarButtonsL(); |
|
186 |
|
187 /** |
|
188 * Adds missed alarms view's toolbar buttons |
|
189 */ |
|
190 void AddToolbarButtonsL(); |
|
191 |
|
192 /** |
|
193 * Dim clear and clear all toolbar buttons when there are no |
|
194 * missed alarm entries to clear |
|
195 */ |
|
196 void DimClearAndClearAllButtons(); |
|
197 |
|
198 private: //data members |
|
199 TInt iMissedAlarmsCount; |
|
200 |
|
201 enum TPopulationStep |
|
202 { |
|
203 ENothingDone, |
|
204 EPopulationDone |
|
205 }; |
|
206 TPopulationStep iPopulationStep; |
|
207 TBool iShowCloseButtonOnCba; |
|
208 TInt iHighlightedRowNumber; |
|
209 }; |
|
210 |
|
211 #endif // CALENMISSEDALARMSVIEW_H |