66
|
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 container class declaration
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CALENMISSEDALARMSCONTAINER_H
|
|
21 |
#define CALENMISSEDALARMSCONTAINER_H
|
|
22 |
|
|
23 |
#include<coecntrl.h>
|
|
24 |
#include<missedalarm.h>
|
|
25 |
#include<missedalarmstore.h>
|
|
26 |
#include <eiklbo.h>
|
|
27 |
#include <caleninstanceid.h> // TCalenInstanceId
|
|
28 |
|
|
29 |
#include "calencontainer.h"
|
|
30 |
#include "calenmissedalarmsview.h"
|
|
31 |
|
|
32 |
// FORWARD DECLARATIONS
|
|
33 |
class CAknDoubleGraphicStyleListBox;
|
|
34 |
class CAknIconArray;
|
|
35 |
class CCalenAppUi;
|
|
36 |
class CCalEntry;
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Class declaration for Missed alarms container
|
|
40 |
*/
|
|
41 |
NONSHARABLE_CLASS(CCalenMissedAlarmsContainer) : public CCalenContainer
|
|
42 |
, public MEikListBoxObserver
|
|
43 |
{
|
|
44 |
public:
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Two-phased constructor.
|
|
48 |
* @param aRect of this container.
|
|
49 |
* @param aView CCalenMissedAlarmsView* that owns this class.
|
|
50 |
* @return CCalenMissedAlarmsContainer*
|
|
51 |
*/
|
|
52 |
CCalenMissedAlarmsContainer( CCalenNativeView* aView,
|
|
53 |
MCalenServices& aServices,
|
|
54 |
TInt& aHighlightedRowNumber);
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Destructor.
|
|
58 |
*/
|
|
59 |
virtual ~CCalenMissedAlarmsContainer();
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Return list box pointer.
|
|
63 |
* @return List box pointer.
|
|
64 |
*/
|
|
65 |
CAknDoubleGraphicStyleListBox* ListBox() const;
|
|
66 |
|
|
67 |
private: // Functions from base classes
|
|
68 |
/**
|
|
69 |
* From CCoeControl, child control was resized.
|
|
70 |
*/
|
|
71 |
void SizeChanged();
|
|
72 |
|
|
73 |
/**
|
|
74 |
* From CCoeControl, return child control count.
|
|
75 |
* @return Control count
|
|
76 |
*/
|
|
77 |
TInt CountComponentControls() const;
|
|
78 |
|
|
79 |
/**
|
|
80 |
* From CCoeControl, return child control pointer.
|
|
81 |
* @param aIndex Child control index
|
|
82 |
* @return Child control pointer.
|
|
83 |
*/
|
|
84 |
CCoeControl* ComponentControl(TInt aIndex) const;
|
|
85 |
|
|
86 |
/**
|
|
87 |
* From CCoeControl, process key event.
|
|
88 |
* @param aKeyEvent The key event.
|
|
89 |
* @param aType EEventKey | EEventKeyUp | EEventKeyDown.
|
|
90 |
* @return EKeyWasNotConsumed : Key event was not consumed.
|
|
91 |
*/
|
|
92 |
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
|
|
93 |
TEventCode aType);
|
|
94 |
|
|
95 |
/**
|
|
96 |
* From CCoeControl, process pointer event.
|
|
97 |
*/
|
|
98 |
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
|
|
99 |
|
|
100 |
/**
|
|
101 |
* From CCoeControl
|
|
102 |
*/
|
|
103 |
void Draw(const TRect& /*aRect*/) const;
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Pass skin information if needed
|
|
107 |
*/
|
|
108 |
TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
|
|
109 |
|
|
110 |
/**
|
|
111 |
* From CCoeControl, Get help context.
|
|
112 |
* @param aContext Help context
|
|
113 |
*/
|
|
114 |
void GetHelpContext(TCoeHelpContext& aContext) const;
|
|
115 |
|
|
116 |
/**
|
|
117 |
* From MActiveStep, refresh EventView data.
|
|
118 |
*/
|
|
119 |
TInt DoStepL();
|
|
120 |
|
|
121 |
/**
|
|
122 |
* From CCoeControl Handles a resource relative event
|
|
123 |
*/
|
|
124 |
void HandleResourceChange(TInt aType);
|
|
125 |
|
|
126 |
private: // From CCalenContainer
|
|
127 |
|
|
128 |
/**
|
|
129 |
* From CCalenContainer Third phase constructor.
|
|
130 |
* This function was called CCalenView::ConstructL().
|
|
131 |
*/
|
|
132 |
void ConstructImplL();
|
|
133 |
|
|
134 |
/**
|
|
135 |
* From CCalenContainer.
|
|
136 |
* This methods is called after calendar settings have changed.
|
|
137 |
*/
|
|
138 |
void UpdateSize();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Create icon index
|
|
142 |
*/
|
|
143 |
void CreateIconIndicesL( RArray<MCalenServices::TCalenIcons>& aIndexArray );
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Handles list box events.
|
|
147 |
* @param aListBox The originating list box.
|
|
148 |
* @param aEventType A code for the event.
|
|
149 |
*/
|
|
150 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
|
|
151 |
|
|
152 |
/**
|
|
153 |
* This method is called after pointer event in Navi
|
|
154 |
* decoration object.
|
|
155 |
* @param aDirection right or left
|
|
156 |
*/
|
|
157 |
void HandleNaviDecoratorEventL(TInt aEventID);
|
|
158 |
|
|
159 |
/**
|
|
160 |
* Handle long tap events
|
|
161 |
*/
|
|
162 |
void HandleLongTapEventL( const TPoint& aPenEventLocation,
|
|
163 |
const TPoint& aPenEventScreenLocation );
|
|
164 |
private:
|
|
165 |
|
|
166 |
/**
|
|
167 |
* Gets an icon index corresponding to a note
|
|
168 |
* @param aEntry Agenda entry
|
|
169 |
* @return ENullIcon | EBirthdayIcon |
|
|
170 |
* EMeetingIcon | EDaynoteIcon | EToDoIcon
|
|
171 |
*/
|
|
172 |
TInt IconIndexForEntryL(CCalEntry& aEntry, TInt aSeenMissedAlarm);
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Creates the list box data
|
|
176 |
* @aIndex index of the listbox
|
|
177 |
*/
|
|
178 |
void CreateListBoxDataL(TInt aIndex);
|
|
179 |
|
|
180 |
/**
|
|
181 |
* Get Missed Alarm Entry
|
|
182 |
* @param aIndex: index for fetching the missed alarm entry
|
|
183 |
* @return CCalEntry* pointer to the calendar entry
|
|
184 |
*/
|
|
185 |
CCalEntry* GetMissedAlarmEntryL(TInt aIndex) const ;
|
|
186 |
|
|
187 |
/**
|
|
188 |
* Get the Instance Time
|
|
189 |
* @param aIndex : index for fetching the instance time
|
|
190 |
* @return TTime returns the instance time
|
|
191 |
*/
|
|
192 |
TTime GetInstanceTime(TInt aIndex) const ;
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Get the Viewed Event Information
|
|
196 |
*
|
|
197 |
* @param aIndex : index for fetching the viewed event info
|
|
198 |
* @return TInt returns the viewed event info
|
|
199 |
*/
|
|
200 |
TInt GetViewedEventInfo(TInt aIndex);
|
|
201 |
|
|
202 |
/**
|
|
203 |
* Set current item index and draw list.
|
|
204 |
*/
|
|
205 |
void SetCurrentItemIndexAndDraw();
|
|
206 |
|
|
207 |
/**
|
|
208 |
* Sets the correct highlight, based on the context.
|
|
209 |
*/
|
|
210 |
void SetHighlightingL();
|
|
211 |
|
|
212 |
/**
|
|
213 |
* Set current item index.
|
|
214 |
* @param aIndex Item index
|
|
215 |
*/
|
|
216 |
void SetCurrentItemIndex(TInt aIndex);
|
|
217 |
|
|
218 |
/**
|
|
219 |
* Set empty list text
|
|
220 |
*/
|
|
221 |
void SetEmptyListTextL();
|
|
222 |
|
|
223 |
public:
|
|
224 |
|
|
225 |
/**
|
|
226 |
* Updates missed alarms array
|
|
227 |
*/
|
|
228 |
void UpdateMissedAlarmsArrayL();
|
|
229 |
|
|
230 |
/**
|
|
231 |
* Populate Missed alarms View with missed alarm entries
|
|
232 |
*/
|
|
233 |
void PopulateWithMissedAlarmsL();
|
|
234 |
|
|
235 |
/**
|
|
236 |
* Completes the population of the Missed alarms view
|
|
237 |
*/
|
|
238 |
void CompletePopulationL();
|
|
239 |
|
|
240 |
/**
|
|
241 |
* Returns the current lisbox item's index
|
|
242 |
* @return returns the current listbox's index
|
|
243 |
*/
|
|
244 |
TInt CurrentItemIndex();
|
|
245 |
|
|
246 |
/**
|
|
247 |
* Returns the Missed alarms Count
|
|
248 |
* @return returns the missed alarms count
|
|
249 |
*/
|
|
250 |
TInt MissedAlarmsCount();
|
|
251 |
|
|
252 |
/**
|
|
253 |
* Sets the context from the current focused missed alarm entry
|
|
254 |
* @aIndex index of the missed alarm entry
|
|
255 |
*/
|
|
256 |
void SetContextFromMissedAlarmEntryL(TInt aIndex);
|
|
257 |
|
|
258 |
/**
|
|
259 |
* Returns the index of the missed alarm entry
|
|
260 |
* @aId Intance id of the context
|
|
261 |
* @return TInt return focused index of the missed alarms entry
|
|
262 |
*/
|
|
263 |
TInt FindMissedAlarmEntryIndexL(const TCalenInstanceId& aId);
|
|
264 |
|
|
265 |
private: // Data Members
|
|
266 |
|
|
267 |
CAknDoubleGraphicStyleListBox* iListBox;
|
|
268 |
CCalenMissedAlarmsView* iMissedAlarmsView;
|
|
269 |
CMissedAlarmStore* iMissedAlarmStore;
|
|
270 |
RArray<TCalenInstanceId> iMissedAlarmsArray;
|
|
271 |
CDesCArray* iListBoxItemArray;
|
|
272 |
TUint32 iMissedAlarmsCount;
|
|
273 |
TInt& iHighlightedRowNumber;
|
|
274 |
TBool iFirstTap;
|
|
275 |
};
|
|
276 |
|
|
277 |
#endif // CALENMISSEDALARMSCONTAINER_H
|
|
278 |
|
|
279 |
// End of File
|