author | Fionntina Carville <fionntinac@symbian.org> |
Mon, 15 Nov 2010 11:42:53 +0000 | |
branch | RCL_3 |
changeset 92 | 3b7c3fce86f2 |
parent 86 | ed599363c2d7 |
permissions | -rw-r--r-- |
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: Container for missed alarm view's controls. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
// System Includes |
|
21 |
#include <StringLoader.h> |
|
22 |
#include <eikdef.h> |
|
23 |
#include <eikenv.h> |
|
24 |
#include <avkon.rsg> |
|
25 |
#include <AknUtils.h> |
|
26 |
#include <aknlists.h> |
|
27 |
#include <AknsUtils.h> |
|
28 |
#include <AknIconArray.h> |
|
29 |
#include <avkon.hrh> |
|
30 |
#include <aknconsts.h> |
|
31 |
#include <data_caging_path_literals.hrh> |
|
32 |
#include <AknIconArray.h> |
|
33 |
#include <AknsDrawUtils.h> |
|
34 |
#include <avkon.mbg> |
|
35 |
#include <gulicon.h> |
|
36 |
#include <aknenv.h> |
|
37 |
#include <eikapp.h> |
|
38 |
#include <AknBidiTextUtils.h> |
|
39 |
#include <aknlayoutscalable_apps.cdl.h> |
|
40 |
#include <AknsFrameBackgroundControlContext.h> |
|
41 |
#include <csxhelp/cale.hlp.hrh> |
|
42 |
#include <calentryview.h> |
|
43 |
#include <calsession.h> |
|
44 |
#include <calinstanceview.h> |
|
45 |
#include <calinstance.h> |
|
46 |
#include <missedalarmstore.h> |
|
47 |
#include <missedalarm.h> |
|
48 |
#include <calenagendautils.h> |
|
49 |
#include <calenglobaldata.h> |
|
50 |
#include <calendar.mbg> |
|
51 |
#include <Calendar.rsg> |
|
52 |
#include <calencommands.hrh> // Calendar commands |
|
53 |
#include <calencontext.h> |
|
54 |
#include <caleninstanceid.h> // TCalenInstanceId |
|
55 |
#include <calenservices.h> |
|
56 |
#include <calentoolbar.h> |
|
57 |
#include <calenviewutils.h> |
|
58 |
||
59 |
// User Includes |
|
60 |
#include "calendarui_debug.h" |
|
61 |
#include "calenmissedalarmscontainer.h" |
|
62 |
#include "calendar.hrh" |
|
63 |
#include "calencontainer.h" |
|
64 |
#include "calenicons.h" |
|
65 |
#include "calenicons.h" |
|
66 |
#include "CalenUid.h" |
|
67 |
||
68 |
// Constants |
|
69 |
const TInt KMissedAlarmListMaxLength = 25; |
|
70 |
const TInt KMissedAlarmListBoxItems = 10; |
|
71 |
const TInt KListDataLength = 256; |
|
72 |
_LIT( KListSeparator, "\t" ); |
|
73 |
_LIT( KIconFormat,"%d"); |
|
74 |
||
75 |
// ----------------------------------------------------------------------------- |
|
76 |
// CCalenMissedAlarmsContainer::CCalenMissedAlarmsContainer |
|
77 |
// Performs the first phase of two phase construction. |
|
78 |
// ----------------------------------------------------------------------------- |
|
79 |
// |
|
80 |
CCalenMissedAlarmsContainer::CCalenMissedAlarmsContainer(CCalenNativeView* aView, |
|
81 |
MCalenServices& aServices,TInt& aHighlightedRowNumber) : |
|
82 |
CCalenContainer(aView, aServices), |
|
83 |
iHighlightedRowNumber(aHighlightedRowNumber) |
|
84 |
{ |
|
85 |
TRACE_ENTRY_POINT; |
|
86 |
TRACE_EXIT_POINT; |
|
87 |
} |
|
88 |
||
89 |
// ----------------------------------------------------------------------------- |
|
90 |
// CCalenMissedAlarmsContainer::~CCalenMissedAlarmsContainer |
|
91 |
// Destructor |
|
92 |
// ----------------------------------------------------------------------------- |
|
93 |
// |
|
94 |
CCalenMissedAlarmsContainer::~CCalenMissedAlarmsContainer() |
|
95 |
{ |
|
96 |
TRACE_ENTRY_POINT; |
|
97 |
||
98 |
if(iListBoxItemArray) |
|
99 |
{ |
|
100 |
delete iListBoxItemArray; |
|
101 |
} |
|
102 |
if(iMissedAlarmsArray.Count()) |
|
103 |
{ |
|
104 |
iMissedAlarmsArray.Reset(); |
|
105 |
iMissedAlarmsArray.Close(); |
|
106 |
} |
|
107 |
if (iListBox) |
|
108 |
{ |
|
109 |
delete iListBox; |
|
110 |
iListBox = NULL; |
|
111 |
} |
|
112 |
||
113 |
TRACE_EXIT_POINT; |
|
114 |
} |
|
115 |
||
116 |
// ---------------------------------------------------------------------------- |
|
117 |
// CCalenMissedAlarmsContainer::ConstructImplL |
|
118 |
// Third phase constructor. |
|
119 |
// This function was called CCalenNativeView::ConstructL(). |
|
120 |
// (other items were commented in a header). |
|
121 |
// ---------------------------------------------------------------------------- |
|
122 |
// |
|
123 |
void CCalenMissedAlarmsContainer::ConstructImplL() |
|
124 |
{ |
|
125 |
TRACE_ENTRY_POINT; |
|
126 |
||
127 |
iListBoxItemArray = new(ELeave) CDesCArrayFlat(KMissedAlarmListBoxItems); |
|
128 |
||
129 |
iMissedAlarmStore = iServices.MissedAlarmStore(); |
|
130 |
||
131 |
// Get the missed alarms count |
|
132 |
iMissedAlarmStore->CountL(iMissedAlarmsCount); |
|
133 |
||
134 |
iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox; |
|
135 |
iListBox->ConstructL( this, 0); |
|
136 |
iListBox->SetContainerWindowL( *this); |
|
137 |
||
138 |
// Create scroll bar |
|
139 |
iListBox->CreateScrollBarFrameL(ETrue); |
|
140 |
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, |
|
141 |
CEikScrollBarFrame::EAuto); |
|
142 |
iListBox->SetListBoxObserver( this ); // single click changes MK |
|
143 |
// set the model array |
|
144 |
iListBox->Model()->SetItemTextArray(iListBoxItemArray); |
|
145 |
||
146 |
// set icon array |
|
147 |
CAknIconArray* iconArray = CreateIconsL( iIconIndices, KCalenMissedAlarmsViewUidValue ); |
|
148 |
CleanupStack::PushL(iconArray); |
|
149 |
iListBox->ItemDrawer()->FormattedCellData()->SetIconArray(iconArray); |
|
150 |
CleanupStack::Pop(); |
|
151 |
||
152 |
iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray); |
|
153 |
iListBox->View()->SetListEmptyTextL( KNullDesC ); |
|
154 |
iFirstTap = EFalse; |
|
155 |
||
156 |
TRACE_EXIT_POINT; |
|
157 |
} |
|
158 |
||
159 |
// ---------------------------------------------------------------------------- |
|
160 |
// CCalenMissedAlarmsContainer::UpdateSize |
|
161 |
// Do layout changes after calendar settings are |
|
162 |
// changed. No necessary actions for this view. |
|
163 |
// ---------------------------------------------------------------------------- |
|
164 |
// |
|
165 |
void CCalenMissedAlarmsContainer::UpdateSize() |
|
166 |
{ |
|
167 |
TRACE_ENTRY_POINT; |
|
168 |
TRACE_EXIT_POINT; |
|
169 |
} |
|
170 |
||
171 |
// ----------------------------------------------------------------------------- |
|
172 |
// CCalenMissedAlarmsContainer::IconIndexForEntryL |
|
173 |
// Gets the Icon Index for the missed alarm entry |
|
174 |
// (other items were commented in a header). |
|
175 |
// ----------------------------------------------------------------------------- |
|
176 |
// |
|
177 |
TInt CCalenMissedAlarmsContainer::IconIndexForEntryL(CCalEntry& aEntry, |
|
178 |
TInt aSeenMissedAlarm) |
|
179 |
{ |
|
180 |
TRACE_ENTRY_POINT; |
|
181 |
TInt iconIndex(0); |
|
182 |
||
183 |
if(aSeenMissedAlarm) |
|
184 |
{ |
|
185 |
switch(aEntry.EntryTypeL()) |
|
186 |
{ |
|
187 |
case CCalEntry::EAnniv: |
|
188 |
iconIndex = IconIndex(MCalenServices::ECalenBirthdayIcon); |
|
189 |
break; |
|
190 |
case CCalEntry::EEvent: |
|
191 |
iconIndex = IconIndex(MCalenServices::ECalenDaynoteIcon); |
|
192 |
break; |
|
193 |
case CCalEntry::EAppt: |
|
194 |
iconIndex = IconIndex(MCalenServices::ECalenMeetingIcon); |
|
195 |
break; |
|
196 |
case CCalEntry::ETodo: |
|
197 |
iconIndex = IconIndex(MCalenServices::ECalenTodoIconUndone); |
|
198 |
break; |
|
199 |
default: |
|
200 |
ASSERT( EFalse ); |
|
201 |
break; |
|
202 |
} |
|
203 |
} |
|
204 |
else |
|
205 |
{ |
|
206 |
switch(aEntry.EntryTypeL()) |
|
207 |
{ |
|
208 |
case CCalEntry::EAnniv: |
|
209 |
iconIndex = IconIndex(MCalenServices::ECalenBirthdayIconMissed); |
|
210 |
break; |
|
211 |
case CCalEntry::EEvent: |
|
212 |
iconIndex = IconIndex(MCalenServices::ECalenDaynoteIconMissed); |
|
213 |
break; |
|
214 |
case CCalEntry::EAppt: |
|
215 |
iconIndex = IconIndex(MCalenServices::ECalenMeetingIconMissed); |
|
216 |
break; |
|
217 |
case CCalEntry::ETodo: |
|
218 |
iconIndex = IconIndex(MCalenServices::ECalenToDoIconMissed); |
|
219 |
break; |
|
220 |
default: |
|
221 |
ASSERT( EFalse ); |
|
222 |
break; |
|
223 |
} |
|
224 |
} |
|
225 |
return iconIndex; |
|
226 |
TRACE_EXIT_POINT; |
|
227 |
} |
|
228 |
||
229 |
// ---------------------------------------------------------------------------- |
|
230 |
// CCalenMissedAlarmsContainer::CreateIconIndicesL |
|
231 |
// Fill the list of icons used by the MAV |
|
232 |
// (other items were commented in a header). |
|
233 |
// ---------------------------------------------------------------------------- |
|
234 |
// |
|
235 |
void CCalenMissedAlarmsContainer::CreateIconIndicesL( |
|
236 |
RArray<MCalenServices::TCalenIcons>& aIndexArray) |
|
237 |
{ |
|
238 |
TRACE_ENTRY_POINT; |
|
239 |
||
240 |
aIndexArray.Reset(); |
|
241 |
aIndexArray.AppendL( MCalenServices::ECalenBirthdayIcon ); |
|
242 |
aIndexArray.AppendL( MCalenServices::ECalenDaynoteIcon ); |
|
243 |
aIndexArray.AppendL( MCalenServices::ECalenMeetingIcon ); |
|
244 |
aIndexArray.AppendL( MCalenServices::ECalenTodoIconUndone ); |
|
245 |
aIndexArray.AppendL( MCalenServices::ECalenBirthdayIconMissed ); |
|
246 |
aIndexArray.AppendL( MCalenServices::ECalenDaynoteIconMissed ); |
|
247 |
aIndexArray.AppendL( MCalenServices::ECalenMeetingIconMissed ); |
|
248 |
aIndexArray.AppendL( MCalenServices::ECalenToDoIconMissed ); |
|
249 |
aIndexArray.AppendL( MCalenServices::ECalenClearMissedAlarms ); |
|
250 |
aIndexArray.AppendL( MCalenServices::ECalenClearAllMissedAlarms ) |
|
251 |
||
252 |
TRACE_EXIT_POINT; |
|
253 |
} |
|
254 |
||
255 |
// ---------------------------------------------------------------------------- |
|
256 |
// CCalenMissedAlarmsContainer::GetHelpContext |
|
257 |
// Get help context. |
|
258 |
// (other items were commented in a header). |
|
259 |
// ---------------------------------------------------------------------------- |
|
260 |
// |
|
261 |
void CCalenMissedAlarmsContainer::GetHelpContext(TCoeHelpContext& aContext) const |
|
262 |
{ |
|
263 |
TRACE_ENTRY_POINT; |
|
264 |
||
265 |
aContext.iMajor = KUidCalendar; |
|
266 |
aContext.iContext = KCALE_HLP_MONTH_VIEW; // need to change |
|
267 |
||
268 |
TRACE_EXIT_POINT; |
|
269 |
} |
|
270 |
||
271 |
// ----------------------------------------------------------------------------- |
|
272 |
// CCalenMissedAlarmsContainer::MopSupplyObject |
|
273 |
// Pass the skin information |
|
274 |
// (other items were commented in a header). |
|
275 |
// ----------------------------------------------------------------------------- |
|
276 |
// |
|
277 |
TTypeUid::Ptr CCalenMissedAlarmsContainer::MopSupplyObject(TTypeUid aId) |
|
278 |
{ |
|
279 |
TRACE_ENTRY_POINT; |
|
280 |
TRACE_EXIT_POINT; |
|
281 |
||
282 |
return MAknsControlContext::SupplyMopObject(aId, iBgContext); |
|
283 |
} |
|
284 |
||
285 |
// ----------------------------------------------------------------------------- |
|
286 |
// CCalenMissedAlarmsContainer::ListBox |
|
287 |
// Returns the listbox |
|
288 |
// ----------------------------------------------------------------------------- |
|
289 |
// |
|
290 |
CAknDoubleGraphicStyleListBox* CCalenMissedAlarmsContainer::ListBox() const |
|
291 |
{ |
|
292 |
TRACE_ENTRY_POINT; |
|
293 |
TRACE_EXIT_POINT; |
|
294 |
||
295 |
return iListBox; |
|
296 |
} |
|
297 |
||
298 |
// ----------------------------------------------------------------------------- |
|
299 |
// CCalenMissedAlarmsContainer::SizeChanged |
|
300 |
// Called by the framework when the view size is changed. |
|
301 |
// ----------------------------------------------------------------------------- |
|
302 |
// |
|
303 |
void CCalenMissedAlarmsContainer::SizeChanged() |
|
304 |
{ |
|
305 |
TRACE_ENTRY_POINT; |
|
306 |
TRect main_pane( Rect() ); |
|
307 |
CCalenContainer::SizeChanged( main_pane ); |
|
308 |
||
309 |
if(iListBox) |
|
310 |
{ |
|
311 |
iListBox->SetRect( main_pane ); |
|
312 |
} |
|
313 |
||
314 |
TRACE_EXIT_POINT; |
|
315 |
} |
|
316 |
||
317 |
// ----------------------------------------------------------------------------- |
|
318 |
// CCalenMissedAlarmsContainer::CountComponentControls |
|
319 |
// Gets the number of controls contained in a compound control. |
|
320 |
// ----------------------------------------------------------------------------- |
|
321 |
// |
|
322 |
TInt CCalenMissedAlarmsContainer::CountComponentControls() const |
|
323 |
{ |
|
324 |
TRACE_ENTRY_POINT; |
|
325 |
TRACE_EXIT_POINT; |
|
326 |
||
327 |
return 1; |
|
328 |
} |
|
329 |
||
330 |
// ----------------------------------------------------------------------------- |
|
331 |
// CCalenMissedAlarmsContainer::ComponentControl |
|
332 |
// Gets the specified component of a compound control. |
|
333 |
// ----------------------------------------------------------------------------- |
|
334 |
// |
|
335 |
CCoeControl* CCalenMissedAlarmsContainer::ComponentControl(TInt aIndex) const |
|
336 |
{ |
|
337 |
TRACE_ENTRY_POINT; |
|
338 |
TRACE_EXIT_POINT; |
|
339 |
switch (aIndex) |
|
340 |
{ |
|
341 |
case 0: |
|
342 |
return iListBox; |
|
343 |
default: |
|
344 |
return NULL; |
|
345 |
} |
|
346 |
} |
|
347 |
||
348 |
// ----------------------------------------------------------------------------- |
|
349 |
// CCalenMissedAlarmsContainer::OfferKeyEventL |
|
350 |
// Called by the framework when a key event needs to be processed. |
|
351 |
// ----------------------------------------------------------------------------- |
|
352 |
// |
|
353 |
TKeyResponse CCalenMissedAlarmsContainer::OfferKeyEventL( |
|
354 |
const TKeyEvent& aKeyEvent, TEventCode aType) |
|
355 |
{ |
|
356 |
TRACE_ENTRY_POINT; |
|
357 |
||
358 |
TKeyResponse ret(EKeyWasNotConsumed); |
|
359 |
||
360 |
if (EEventKey == aType) |
|
361 |
{ |
|
362 |
switch (aKeyEvent.iCode) |
|
363 |
{ |
|
364 |
case EKeyBackspace: |
|
365 |
case EKeyDelete: |
|
366 |
{ |
|
367 |
iView->HandleCommandL(ECalenCmdClear); |
|
368 |
ret = EKeyWasConsumed; |
|
369 |
} |
|
370 |
break; |
|
371 |
default: |
|
372 |
break; |
|
373 |
} |
|
374 |
} |
|
375 |
||
376 |
if(ret == EKeyWasNotConsumed) |
|
377 |
{ |
|
378 |
TInt oldCursor = iListBox->View()->CurrentItemIndex(); |
|
379 |
ret = iListBox->OfferKeyEventL(aKeyEvent, aType); |
|
380 |
TInt newCursor = iListBox->View()->CurrentItemIndex(); |
|
381 |
if(oldCursor != newCursor) |
|
382 |
{ |
|
383 |
iHighlightedRowNumber = newCursor; |
|
384 |
SetContextFromMissedAlarmEntryL(newCursor); |
|
385 |
} |
|
386 |
} |
|
387 |
TRACE_EXIT_POINT; |
|
388 |
return ret; |
|
389 |
} |
|
390 |
||
391 |
// ----------------------------------------------------------------------------- |
|
392 |
// CCalenMissedAlarmsContainer::HandleResourceChange |
|
393 |
// Handles a change to the application's resources which are shared across the environment. |
|
394 |
// ----------------------------------------------------------------------------- |
|
395 |
// |
|
396 |
void CCalenMissedAlarmsContainer::HandleResourceChange(TInt aType) |
|
397 |
{ |
|
398 |
TRACE_ENTRY_POINT; |
|
399 |
||
400 |
CCalenContainer::HandleResourceChange( aType ); |
|
401 |
||
402 |
if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch ) |
|
403 |
{ |
|
86
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
404 |
// SizeChanged(); |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
405 |
TRect main_pane; |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
406 |
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, main_pane ); |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
407 |
SetRect( main_pane ); |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
408 |
if(iListBox) |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
409 |
{ |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
410 |
TRect mainPane; |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
411 |
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane ); |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
412 |
TRect bgContextRect( TPoint(0, 0), mainPane.Size() ); |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
413 |
iListBox->SetRect( bgContextRect ); |
ed599363c2d7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
74
diff
changeset
|
414 |
} |
66 | 415 |
|
416 |
// refresh |
|
417 |
TRAPD(error,iView->BeginRepopulationL()); |
|
418 |
if(error!=KErrNone) |
|
419 |
{ |
|
420 |
// do avoid warning |
|
421 |
} |
|
422 |
} |
|
423 |
||
424 |
CCoeControl::HandleResourceChange( aType ); |
|
425 |
||
426 |
TRACE_EXIT_POINT; |
|
427 |
} |
|
428 |
||
429 |
// ----------------------------------------------------------------------------- |
|
430 |
// CCalenMissedAlarmsContainer::Draw |
|
431 |
// Draws the control |
|
432 |
// ----------------------------------------------------------------------------- |
|
433 |
// |
|
434 |
void CCalenMissedAlarmsContainer::Draw(const TRect& aRect) const |
|
435 |
{ |
|
436 |
TRACE_ENTRY_POINT; |
|
437 |
||
438 |
CWindowGc& gc = SystemGc(); |
|
439 |
TRect main_pane( Rect() ); |
|
440 |
||
441 |
MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
442 |
MAknsControlContext* cc = AknsDrawUtils::ControlContext(this); |
|
443 |
||
444 |
AknsDrawUtils::Background(skin, cc, this, gc, aRect); |
|
445 |
||
446 |
TRACE_EXIT_POINT; |
|
447 |
} |
|
448 |
||
449 |
// ----------------------------------------------------------------------------- |
|
450 |
// CCalenMissedAlarmsContainer::HandlePointerEventL |
|
451 |
// Handles the pointer events in touch resolutions |
|
452 |
// ----------------------------------------------------------------------------- |
|
453 |
// |
|
454 |
void CCalenMissedAlarmsContainer::HandlePointerEventL( |
|
455 |
const TPointerEvent& aPointerEvent) |
|
456 |
{ |
|
457 |
TRACE_ENTRY_POINT; |
|
458 |
||
459 |
TInt pointerIndex(-1); |
|
460 |
TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); |
|
74
97232defd20e
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
461 |
if(iView->IsCalenLaunchedFromExtApp()) |
97232defd20e
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
462 |
{ |
97232defd20e
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
463 |
return; |
97232defd20e
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
464 |
} |
66 | 465 |
|
466 |
if(isItem == EFalse) |
|
467 |
{ |
|
468 |
iListBox->HandlePointerEventL(aPointerEvent); |
|
469 |
return; |
|
470 |
} |
|
471 |
||
472 |
TInt index = iListBox->CurrentItemIndex(); |
|
473 |
||
474 |
switch (aPointerEvent.iType) |
|
475 |
{ |
|
476 |
case TPointerEvent::EButton1Down: |
|
477 |
{ |
|
478 |
TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); |
|
479 |
||
480 |
if(isItem && MissedAlarmsCount() > 0) |
|
481 |
{ |
|
482 |
iHighlightedRowNumber = iListBox->View()->CurrentItemIndex(); |
|
483 |
SetContextFromMissedAlarmEntryL(iListBox->View()->CurrentItemIndex()); |
|
484 |
} |
|
485 |
||
486 |
break; |
|
487 |
} |
|
488 |
case TPointerEvent::EDrag: |
|
489 |
{ |
|
490 |
/*iListBox->HandlePointerEventL(aPointerEvent); |
|
491 |
if (iFirstTap && index != iListBox->CurrentItemIndex()) |
|
492 |
{ |
|
493 |
iFirstTap = EFalse; |
|
494 |
}*/ |
|
495 |
break; |
|
496 |
} |
|
497 |
||
498 |
case TPointerEvent::EButton1Up: |
|
499 |
{ |
|
500 |
// if (iFirstTap) |
|
501 |
{ |
|
502 |
// iView->HandleCommandL(ECalenMissedEventView); |
|
503 |
} |
|
504 |
break; |
|
505 |
} |
|
506 |
default: |
|
507 |
break; |
|
508 |
} |
|
509 |
||
510 |
if ( aPointerEvent.iType != TPointerEvent::EButtonRepeat ) |
|
511 |
{ |
|
512 |
iListBox->HandlePointerEventL( aPointerEvent ); |
|
513 |
} |
|
514 |
||
515 |
TRACE_EXIT_POINT; |
|
516 |
} |
|
517 |
||
518 |
// ---------------------------------------------------------------------------- |
|
519 |
// CCalenMissedAlarmsContainer::HandleNaviDecoratorEventL |
|
520 |
// ?implementation_description |
|
521 |
// (other items were commented in a header). |
|
522 |
// ---------------------------------------------------------------------------- |
|
523 |
// |
|
524 |
void CCalenMissedAlarmsContainer::HandleNaviDecoratorEventL( TInt /*aEventID*/ ) |
|
525 |
{ |
|
526 |
TRACE_ENTRY_POINT; |
|
527 |
||
528 |
TRACE_EXIT_POINT; |
|
529 |
} |
|
530 |
||
531 |
// ---------------------------------------------------------------------------- |
|
532 |
// CCalenMissedAlarmsContainer::HandleLongTapEventL |
|
533 |
// processing of a long tap event |
|
534 |
// (other items were commented in a header). |
|
535 |
// ---------------------------------------------------------------------------- |
|
536 |
// |
|
537 |
void CCalenMissedAlarmsContainer::HandleLongTapEventL( const TPoint& /*aPenEventLocation*/, |
|
538 |
const TPoint& /*aPenEventScreenLocation*/ ) |
|
539 |
{ |
|
540 |
TRACE_ENTRY_POINT; |
|
541 |
||
542 |
TRACE_EXIT_POINT; |
|
543 |
} |
|
544 |
||
545 |
||
546 |
// ----------------------------------------------------------------------------- |
|
547 |
// CCalenMissedAlarmsContainer::CurrentItemIndex |
|
548 |
// Returns the current/highlighted listbox index |
|
549 |
// ----------------------------------------------------------------------------- |
|
550 |
// |
|
551 |
TInt CCalenMissedAlarmsContainer::CurrentItemIndex() |
|
552 |
{ |
|
553 |
TRACE_ENTRY_POINT; |
|
554 |
TRACE_EXIT_POINT; |
|
555 |
||
556 |
return iListBox->CurrentItemIndex(); |
|
557 |
} |
|
558 |
||
559 |
// ----------------------------------------------------------------------------- |
|
560 |
// CCalenMissedAlarmsContainer::SetEmptyListTextL |
|
561 |
// Sets the empty list box text (no events) |
|
562 |
// ----------------------------------------------------------------------------- |
|
563 |
// |
|
564 |
void CCalenMissedAlarmsContainer::SetEmptyListTextL() |
|
565 |
{ |
|
566 |
TRACE_ENTRY_POINT; |
|
567 |
||
568 |
HBufC* noEvents = StringLoader::LoadLC(R_CALEN_QTN_CALE_NO_EVENTS); |
|
569 |
iListBox->View()->SetListEmptyTextL(noEvents->Des()); |
|
570 |
CleanupStack::PopAndDestroy(noEvents); |
|
571 |
||
572 |
TRACE_EXIT_POINT; |
|
573 |
} |
|
574 |
||
575 |
// ----------------------------------------------------------------------------- |
|
576 |
// CCalenMissedAlarmsContainer::MissedAlarmsCount |
|
577 |
// Returns the missed alarms count. |
|
578 |
// ----------------------------------------------------------------------------- |
|
579 |
// |
|
580 |
TInt CCalenMissedAlarmsContainer::MissedAlarmsCount() |
|
581 |
{ |
|
582 |
TRACE_ENTRY_POINT; |
|
583 |
TRACE_EXIT_POINT; |
|
584 |
||
585 |
return iMissedAlarmsArray.Count(); |
|
586 |
} |
|
587 |
||
588 |
// ---------------------------------------------------------------------------- |
|
589 |
// CCalenMissedAlarmsContainer::SetHighlightingL |
|
590 |
// Sets the highlighting |
|
591 |
// ---------------------------------------------------------------------------- |
|
592 |
// |
|
593 |
void CCalenMissedAlarmsContainer::SetHighlightingL() |
|
594 |
{ |
|
595 |
TRACE_ENTRY_POINT; |
|
596 |
||
597 |
TInt focusIx = KErrNotFound; |
|
598 |
||
599 |
if ( iHighlightedRowNumber != KErrNotFound ) |
|
600 |
{ |
|
601 |
focusIx = iHighlightedRowNumber; |
|
602 |
} |
|
603 |
else |
|
604 |
{ |
|
605 |
MCalenContext& context = iServices.Context(); |
|
606 |
if ( !(context.InstanceId() == TCalenInstanceId::NullInstanceId()) ) |
|
607 |
{ |
|
608 |
iHighlightedRowNumber = focusIx = FindMissedAlarmEntryIndexL(context.InstanceId()); |
|
609 |
} |
|
610 |
} |
|
611 |
||
612 |
// If everything else fails, focus on first item |
|
613 |
if ( focusIx == KErrNotFound ) |
|
614 |
{ |
|
615 |
focusIx = 0; |
|
616 |
} |
|
617 |
||
618 |
// Set iHighlightedRowNumber as the current focus |
|
619 |
SetCurrentItemIndex( focusIx ); |
|
620 |
// Draw listbox with this new iHighlightedRowNumber value. |
|
621 |
// otherwise we won't get updated focus |
|
622 |
SetCurrentItemIndexAndDraw(); |
|
623 |
||
624 |
TRACE_EXIT_POINT; |
|
625 |
} |
|
626 |
||
627 |
// ---------------------------------------------------------------------------- |
|
628 |
// CCalenTodoContainer::SetCurrentItemIndex |
|
629 |
// Set current item index. |
|
630 |
// (other items were commented in a header). |
|
631 |
// ---------------------------------------------------------------------------- |
|
632 |
// |
|
633 |
void CCalenMissedAlarmsContainer::SetCurrentItemIndex(TInt aIndex) |
|
634 |
{ |
|
635 |
TRACE_ENTRY_POINT; |
|
636 |
||
637 |
TInt count(iMissedAlarmsArray.Count()); |
|
638 |
if( aIndex < count ) |
|
639 |
{ |
|
640 |
iHighlightedRowNumber = aIndex; |
|
641 |
} |
|
642 |
else |
|
643 |
{ |
|
644 |
iHighlightedRowNumber = count-1; |
|
645 |
} |
|
646 |
||
647 |
TRACE_EXIT_POINT; |
|
648 |
} |
|
649 |
||
650 |
// ---------------------------------------------------------------------------- |
|
651 |
// CCalenMissedAlarmsContainer::SetCurrentItemIndexAndDraw |
|
652 |
// Set current item index and draw list. |
|
653 |
// ---------------------------------------------------------------------------- |
|
654 |
// |
|
655 |
void CCalenMissedAlarmsContainer::SetCurrentItemIndexAndDraw() |
|
656 |
{ |
|
657 |
TRACE_ENTRY_POINT; |
|
658 |
||
659 |
if( iHighlightedRowNumber != KErrNotFound && |
|
660 |
iHighlightedRowNumber < iListBox->Model()->NumberOfItems() ) |
|
661 |
{ |
|
662 |
iListBox->SetCurrentItemIndexAndDraw( iHighlightedRowNumber ); |
|
663 |
} |
|
664 |
||
665 |
TRACE_EXIT_POINT; |
|
666 |
} |
|
667 |
||
668 |
// ----------------------------------------------------------------------------- |
|
669 |
// CCalenMissedAlarmsContainer::UpdateMissedAlarmsArray |
|
670 |
// Update Missed Alarms Array |
|
671 |
// ----------------------------------------------------------------------------- |
|
672 |
// |
|
673 |
void CCalenMissedAlarmsContainer::UpdateMissedAlarmsArrayL() |
|
674 |
{ |
|
675 |
TRACE_ENTRY_POINT; |
|
676 |
||
677 |
if(iMissedAlarmsArray.Count()) |
|
678 |
{ |
|
679 |
iMissedAlarmsArray.Reset(); |
|
680 |
} |
|
681 |
||
682 |
// get missed alarms list from services |
|
683 |
iServices.GetMissedAlarmsList(iMissedAlarmsArray); |
|
684 |
||
685 |
// Get the missed alarms count |
|
686 |
iMissedAlarmStore->CountL(iMissedAlarmsCount); |
|
687 |
||
688 |
TRACE_EXIT_POINT; |
|
689 |
} |
|
690 |
||
691 |
// ---------------------------------------------------------------------------- |
|
692 |
// CCalenMissedAlarmsContainer::PopulateWithMissedAlarmsL |
|
693 |
// Populate Missed alarms view |
|
694 |
// ---------------------------------------------------------------------------- |
|
695 |
// |
|
696 |
void CCalenMissedAlarmsContainer::PopulateWithMissedAlarmsL() |
|
697 |
{ |
|
698 |
TRACE_ENTRY_POINT; |
|
699 |
||
700 |
// resets list box item array |
|
701 |
if(iListBoxItemArray) |
|
702 |
{ |
|
703 |
delete iListBoxItemArray; |
|
704 |
iListBoxItemArray = NULL; |
|
705 |
} |
|
706 |
||
707 |
iListBoxItemArray = new(ELeave) CDesCArrayFlat(KMissedAlarmListBoxItems); |
|
708 |
||
709 |
if(iMissedAlarmsArray.Count()) |
|
710 |
{ |
|
711 |
for(TInt index = 0;index < iMissedAlarmsArray.Count(); index++ ) |
|
712 |
{ |
|
713 |
CreateListBoxDataL(index); |
|
714 |
} |
|
715 |
iListBox->Model()->SetItemTextArray(iListBoxItemArray); |
|
716 |
||
717 |
if(!iHighlightedRowNumber || iHighlightedRowNumber == KErrNotFound ) |
|
718 |
{ |
|
719 |
//set first missed alarm entry to the context |
|
720 |
SetContextFromMissedAlarmEntryL(0); |
|
721 |
} |
|
722 |
iListBox->HandleItemAdditionL(); |
|
723 |
} |
|
724 |
else |
|
725 |
{ |
|
726 |
iListBox->Model()->SetItemTextArray(iListBoxItemArray); |
|
727 |
SetEmptyListTextL(); |
|
728 |
} |
|
729 |
||
730 |
TRACE_EXIT_POINT; |
|
731 |
} |
|
732 |
||
733 |
// ----------------------------------------------------------------------------- |
|
734 |
// CCalenMissedAlarmsContainer::CreateListBoxDataL |
|
735 |
// Creates the list box items and appends in to listrbox item array |
|
736 |
// ----------------------------------------------------------------------------- |
|
737 |
// |
|
738 |
void CCalenMissedAlarmsContainer::CreateListBoxDataL(TInt aIndex) |
|
739 |
{ |
|
740 |
TRACE_ENTRY_POINT; |
|
741 |
||
742 |
// temporary buffer |
|
743 |
HBufC* buffer = HBufC::NewLC( KListDataLength ); |
|
744 |
CleanupStack::Pop(buffer); |
|
745 |
||
746 |
// initialise the item to construct a new listbox entry |
|
747 |
buffer->Des().Zero(); |
|
748 |
||
749 |
// double graphic style "0\tText\tText2\t1 |
|
750 |
TPtr ptr( buffer->Des() ); |
|
751 |
||
752 |
CCalEntry* entry = NULL; |
|
753 |
TTime instanceTime; |
|
754 |
TInt isEventViewed; |
|
755 |
||
756 |
// Get the missed alarm entry |
|
757 |
entry = GetMissedAlarmEntryL(aIndex); |
|
758 |
||
759 |
// Get the instance time |
|
760 |
instanceTime = GetInstanceTime(aIndex); |
|
761 |
||
762 |
// Get the viewed event info |
|
763 |
isEventViewed = GetViewedEventInfo(aIndex); |
|
764 |
||
765 |
if(entry) |
|
766 |
{ |
|
767 |
// get the icon from the entry |
|
768 |
TBuf<10> icon; |
|
769 |
TInt iconIndex(0); |
|
770 |
iconIndex =IconIndexForEntryL( *entry , isEventViewed); |
|
771 |
icon.Format(KIconFormat,iconIndex); |
|
772 |
||
773 |
ptr.Append(icon); |
|
774 |
ptr.Append(KListSeparator); |
|
775 |
||
776 |
// get the subject from the entry |
|
777 |
// Set summary |
|
778 |
// Create temporary buffer for summary |
|
779 |
||
780 |
HBufC* summary = HBufC::NewLC( KMissedAlarmListMaxLength ); |
|
781 |
TPtr summaryPtr = summary->Des(); |
|
782 |
TInt maxLength = summary->Length()- KMissedAlarmListMaxLength; |
|
783 |
CalenViewUtils::GetSummaryLocationTextL( *entry, summaryPtr, KMissedAlarmListMaxLength ); |
|
784 |
||
785 |
AknBidiTextUtils::ConvertToVisualAndClipL( summaryPtr, |
|
786 |
*iEikonEnv->NormalFont(), |
|
787 |
KListDataLength, |
|
788 |
KListDataLength ); |
|
789 |
ptr.Append(summary->Des()); |
|
790 |
ptr.Append(KListSeparator); |
|
791 |
||
792 |
CleanupStack::PopAndDestroy( summary ); |
|
793 |
||
794 |
// get the start time and date |
|
795 |
// for timed display both start time and date |
|
796 |
// append start time of the instance |
|
797 |
TBuf<10> timeString; |
|
798 |
||
799 |
if(entry->EntryTypeL() == CCalEntry::EAppt ) |
|
800 |
{ |
|
801 |
HBufC* timeFormat = StringLoader::LoadLC(R_QTN_TIME_USUAL_WITH_ZERO); |
|
802 |
instanceTime.FormatL(timeString, *timeFormat); |
|
803 |
// convert the date numbers into Arabic-Indic numbers |
|
804 |
AknTextUtils::DisplayTextLanguageSpecificNumberConversion( timeString ); |
|
805 |
CleanupStack::PopAndDestroy(timeFormat); |
|
806 |
} |
|
807 |
||
808 |
//append date |
|
809 |
TBuf<20> dateString; |
|
810 |
HBufC* dateFormat = StringLoader::LoadLC(R_QTN_DATE_USUAL_WITH_ZERO); |
|
811 |
instanceTime.FormatL(dateString, *dateFormat); |
|
812 |
AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dateString ); |
|
813 |
CleanupStack::PopAndDestroy(dateFormat); |
|
814 |
||
815 |
CDesCArrayFlat* strings = new (ELeave) CDesCArrayFlat(2); |
|
816 |
CleanupStack::PushL( strings ); |
|
817 |
||
818 |
strings->AppendL(timeString); |
|
819 |
strings->AppendL(dateString); |
|
820 |
||
821 |
HBufC* timeDateFormat = StringLoader::LoadL(R_CALE_MAV_START_TIME,*strings); |
|
822 |
CleanupStack::PushL( timeDateFormat ); |
|
823 |
ptr.Append(timeDateFormat->Des()); |
|
824 |
CleanupStack::PopAndDestroy(timeDateFormat); |
|
825 |
CleanupStack::PopAndDestroy(strings);// strings |
|
826 |
||
827 |
CleanupStack::PopAndDestroy(entry); |
|
828 |
||
829 |
ptr.Append( KListSeparator ); |
|
830 |
||
831 |
iListBoxItemArray->AppendL(ptr); |
|
832 |
} |
|
833 |
||
834 |
delete buffer; |
|
835 |
||
836 |
TRACE_EXIT_POINT; |
|
837 |
} |
|
838 |
||
839 |
// ----------------------------------------------------------------------------- |
|
840 |
// CCalenMissedAlarmsContainer::GetMissedAlarmEntryL |
|
841 |
// Get a Missed Alarm entry based on the index |
|
842 |
// ----------------------------------------------------------------------------- |
|
843 |
// |
|
844 |
CCalEntry* CCalenMissedAlarmsContainer::GetMissedAlarmEntryL(TInt aIndex) const |
|
845 |
{ |
|
846 |
TRACE_ENTRY_POINT; |
|
847 |
||
848 |
TInt localUid; |
|
849 |
TTime instanceTime; |
|
850 |
TCalenInstanceId missedAlarm = iMissedAlarmsArray[aIndex]; |
|
851 |
||
852 |
// get the local uid and instancetime |
|
853 |
localUid = missedAlarm.iEntryLocalUid; |
|
854 |
instanceTime = missedAlarm.iInstanceTime; |
|
855 |
||
856 |
CCalEntry* entry=NULL; |
|
857 |
// Get the entry using the localUid |
|
858 |
TRAP_IGNORE(entry=iServices.EntryViewL(missedAlarm.iColId)->FetchL(localUid)); |
|
859 |
||
860 |
CleanupStack::PushL(entry); |
|
861 |
||
862 |
TRACE_EXIT_POINT; |
|
863 |
return entry; |
|
864 |
} |
|
865 |
||
866 |
// ----------------------------------------------------------------------------- |
|
867 |
// CCalenMissedAlarmsContainer::GetInstanceTime |
|
868 |
// Get the instance time |
|
869 |
// ----------------------------------------------------------------------------- |
|
870 |
// |
|
871 |
TTime CCalenMissedAlarmsContainer::GetInstanceTime(TInt aIndex) const |
|
872 |
{ |
|
873 |
TRACE_ENTRY_POINT; |
|
874 |
||
875 |
TCalenInstanceId missedAlarm = iMissedAlarmsArray[aIndex]; |
|
876 |
||
877 |
TRACE_EXIT_POINT; |
|
878 |
return missedAlarm.iInstanceTime; |
|
879 |
} |
|
880 |
||
881 |
// ----------------------------------------------------------------------------- |
|
882 |
// CCalenMissedAlarmsContainer::GetViewedEventInfo |
|
883 |
// Get the viewed event information |
|
884 |
// ----------------------------------------------------------------------------- |
|
885 |
// |
|
886 |
TInt CCalenMissedAlarmsContainer::GetViewedEventInfo(TInt aIndex) |
|
887 |
{ |
|
888 |
TRACE_ENTRY_POINT; |
|
889 |
||
890 |
TCalenInstanceId missedAlarm= iMissedAlarmsArray[aIndex]; |
|
891 |
||
892 |
TRACE_EXIT_POINT; |
|
893 |
return missedAlarm.iInstanceViewed; |
|
894 |
} |
|
895 |
||
896 |
// ---------------------------------------------------------------------------- |
|
897 |
// CCalenMissedAlarmsContainer::CompletePopulationL |
|
898 |
// Complete population |
|
899 |
// ---------------------------------------------------------------------------- |
|
900 |
// |
|
901 |
void CCalenMissedAlarmsContainer::CompletePopulationL() |
|
902 |
{ |
|
903 |
TRACE_ENTRY_POINT; |
|
904 |
||
905 |
AddToStackAndMakeVisibleL(); |
|
906 |
SetHighlightingL(); |
|
907 |
DrawDeferred(); |
|
908 |
||
909 |
TRACE_EXIT_POINT; |
|
910 |
} |
|
911 |
||
912 |
// ----------------------------------------------------------------------------- |
|
913 |
// CCalenMissedAlarmsContainer::SetContextFromMissedAlarmEntryL |
|
914 |
// Sets the context from the current focused missed alarm entry |
|
915 |
// ----------------------------------------------------------------------------- |
|
916 |
// |
|
917 |
void CCalenMissedAlarmsContainer::SetContextFromMissedAlarmEntryL(TInt aIndex) |
|
918 |
{ |
|
919 |
TRACE_ENTRY_POINT; |
|
920 |
||
921 |
TCalenInstanceId missedAlarm = iMissedAlarmsArray[aIndex]; |
|
922 |
||
923 |
CCalEntry* entry = iServices.EntryViewL(missedAlarm.iColId)->FetchL( missedAlarm.iEntryLocalUid ); |
|
924 |
//User::LeaveIfNull( entry ); |
|
925 |
if (entry) |
|
926 |
{ |
|
927 |
CleanupStack::PushL( entry ); |
|
928 |
||
929 |
TTime instanceTime; |
|
930 |
TCalTime inscaltime; |
|
931 |
||
932 |
instanceTime = CalenAgendaUtils::EntryTimeL( *entry ); |
|
933 |
inscaltime.SetTimeLocalL( instanceTime ); |
|
934 |
||
935 |
// set the context |
|
936 |
MCalenContext &context = iServices.Context(); |
|
937 |
TCalenInstanceId id = TCalenInstanceId::CreateL( *entry, inscaltime ); |
|
938 |
id.iColId = missedAlarm.iColId; |
|
939 |
context.SetInstanceIdL( id, context.ViewId() ); |
|
940 |
||
941 |
CleanupStack::PopAndDestroy( entry ); |
|
942 |
} |
|
943 |
||
944 |
TRACE_EXIT_POINT; |
|
945 |
} |
|
946 |
||
947 |
// ----------------------------------------------------------------------------- |
|
948 |
// CCalenMissedAlarmsContainer::FindMissedAlarmEntryIndexL |
|
949 |
// Find missed alarm entry's index |
|
950 |
// ----------------------------------------------------------------------------- |
|
951 |
// |
|
952 |
TInt CCalenMissedAlarmsContainer::FindMissedAlarmEntryIndexL( |
|
953 |
const TCalenInstanceId& aId) |
|
954 |
{ |
|
955 |
TRACE_ENTRY_POINT; |
|
956 |
||
957 |
for(TInt index(0); index < iMissedAlarmsArray.Count(); ++index) |
|
958 |
{ |
|
959 |
if( iMissedAlarmsArray[index].iEntryLocalUid == aId.iEntryLocalUid ) |
|
960 |
{ |
|
961 |
TRACE_EXIT_POINT; |
|
962 |
return index; |
|
963 |
} |
|
964 |
} |
|
965 |
||
966 |
TRACE_EXIT_POINT; |
|
967 |
return KErrNotFound; |
|
968 |
} |
|
969 |
||
970 |
||
971 |
void CCalenMissedAlarmsContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, |
|
972 |
TListBoxEvent aEventType) |
|
973 |
{ |
|
974 |
TRACE_ENTRY_POINT; |
|
975 |
switch( aEventType ) |
|
976 |
{ |
|
977 |
// Single click integration |
|
978 |
case EEventItemSingleClicked: |
|
979 |
{ |
|
980 |
iHighlightedRowNumber = iListBox->View()->CurrentItemIndex(); |
|
981 |
||
982 |
SetContextFromMissedAlarmEntryL(iListBox->View()->CurrentItemIndex()); |
|
983 |
//Handle listbox item selection event |
|
984 |
// iListBox->HandlePointerEventL(aPointerEvent); |
|
985 |
if(iView->MenuBar()->IsDisplayed() == EFalse) |
|
986 |
{ |
|
987 |
iView->HandleCommandL( ECalenMissedEventView ); |
|
988 |
} |
|
989 |
break; |
|
990 |
} |
|
991 |
||
992 |
// Single click integration |
|
993 |
case EEventEnterKeyPressed: |
|
994 |
{ |
|
995 |
iHighlightedRowNumber = iListBox->View()->CurrentItemIndex(); |
|
996 |
||
997 |
SetContextFromMissedAlarmEntryL(iListBox->View()->CurrentItemIndex()); |
|
998 |
iView->HandleCommandL( ECalenMissedEventView ); |
|
999 |
break; |
|
1000 |
} |
|
1001 |
default: |
|
1002 |
break; |
|
1003 |
}; |
|
1004 |
TRACE_EXIT_POINT; |
|
1005 |
} |
|
1006 |
||
1007 |
||
1008 |
||
1009 |
// End of File |