66
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-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: Calen icons class description
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#include "calendarui_debug.h"
|
|
20 |
#include "calenicons.h"
|
|
21 |
#include "calendar.hrh"
|
|
22 |
|
|
23 |
#include <CalenUid.h>
|
|
24 |
#include <aknconsts.h>
|
|
25 |
#include <data_caging_path_literals.hrh>
|
|
26 |
#include <AknIconArray.h>
|
|
27 |
#include <AknsDrawUtils.h>
|
|
28 |
#include <avkon.mbg>
|
|
29 |
#include <eikenv.h>
|
|
30 |
#include <gulicon.h>
|
|
31 |
#include <aknenv.h>
|
|
32 |
#include <eikapp.h>
|
|
33 |
#include <calentry.h>
|
|
34 |
#include <calendar.mbg>
|
|
35 |
|
|
36 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
37 |
|
|
38 |
// -----------------------------------------------------------------------------
|
|
39 |
// CCalenIcons::CCalenIcons
|
|
40 |
// C++ default constructor can NOT contain any code, that
|
|
41 |
// might leave.
|
|
42 |
// (other items were commented in a header).
|
|
43 |
// -----------------------------------------------------------------------------
|
|
44 |
//
|
|
45 |
CCalenIcons::CCalenIcons()
|
|
46 |
{
|
|
47 |
TRACE_ENTRY_POINT;
|
|
48 |
TRACE_EXIT_POINT;
|
|
49 |
}
|
|
50 |
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
// CCalenIcons::ConstructL
|
|
53 |
// Symbian 2nd phase constructor can leave.
|
|
54 |
// (other items were commented in a header).
|
|
55 |
// -----------------------------------------------------------------------------
|
|
56 |
//
|
|
57 |
void CCalenIcons::ConstructL()
|
|
58 |
{
|
|
59 |
TRACE_ENTRY_POINT;
|
|
60 |
iIconFile = ((CEikAppUi*)CCoeEnv::Static()->AppUi())->Application()->BitmapStoreName();
|
|
61 |
TRACE_EXIT_POINT;
|
|
62 |
}
|
|
63 |
|
|
64 |
// -----------------------------------------------------------------------------
|
|
65 |
// CCalenIcons::NewL
|
|
66 |
// Symbian 1st phase constructor
|
|
67 |
// (other items were commented in a header).
|
|
68 |
// -----------------------------------------------------------------------------
|
|
69 |
//
|
|
70 |
CCalenIcons* CCalenIcons::NewL()
|
|
71 |
{
|
|
72 |
TRACE_ENTRY_POINT;
|
|
73 |
|
|
74 |
CCalenIcons* self = new( ELeave ) CCalenIcons();
|
|
75 |
|
|
76 |
CleanupStack::PushL( self );
|
|
77 |
self->ConstructL();
|
|
78 |
CleanupStack::Pop( self );
|
|
79 |
|
|
80 |
TRACE_EXIT_POINT;
|
|
81 |
return self;
|
|
82 |
}
|
|
83 |
|
|
84 |
// -----------------------------------------------------------------------------
|
|
85 |
// CCalenIcons::~CCalenIcons
|
|
86 |
// Destructor
|
|
87 |
// (other items were commented in a header).
|
|
88 |
// -----------------------------------------------------------------------------
|
|
89 |
//
|
|
90 |
CCalenIcons::~CCalenIcons()
|
|
91 |
{
|
|
92 |
TRACE_ENTRY_POINT;
|
|
93 |
TRACE_EXIT_POINT;
|
|
94 |
}
|
|
95 |
|
|
96 |
// -----------------------------------------------------------------------------
|
|
97 |
// CCalenIcons::CreateItemNotShownIconL
|
|
98 |
// Create icon for "item not shown"
|
|
99 |
// (other items were commented in a header).
|
|
100 |
// -----------------------------------------------------------------------------
|
|
101 |
//
|
|
102 |
EXPORT_C CGulIcon* CCalenIcons::CreateItemNotShownIconL() const
|
|
103 |
{
|
|
104 |
TRACE_ENTRY_POINT;
|
|
105 |
|
|
106 |
/* This tries to fetch skinned icon first. If it doesn't succeed
|
|
107 |
* it creates color-skinned icon with color white. This is because
|
|
108 |
* EMbmCalendarQgn_indi_item_not_shown is designed to be only used as mask.
|
|
109 |
* It's purpose is to draw three white dots to any background.
|
|
110 |
* So we create white bitmap, and use EMbmCalendarQgn_indi_item_not_shown
|
|
111 |
* as a mask to draw dots.
|
|
112 |
*/
|
|
113 |
CFbsBitmap* bitmap = NULL;
|
|
114 |
CFbsBitmap* mask = NULL;
|
|
115 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
116 |
KAknsIIDQgnIndiItemNotShown,
|
|
117 |
KAknsIIDQsnTextColors,
|
|
118 |
EAknsCIQsnTextColorsCG19,
|
|
119 |
bitmap, mask,
|
|
120 |
iIconFile,
|
|
121 |
EMbmCalendarQgn_indi_item_not_shown,
|
|
122 |
EMbmCalendarQgn_indi_item_not_shown,
|
|
123 |
AKN_LAF_COLOR(0));
|
|
124 |
CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
|
|
125 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
126 |
|
|
127 |
TRACE_EXIT_POINT;
|
|
128 |
return icon;
|
|
129 |
}
|
|
130 |
|
|
131 |
// -----------------------------------------------------------------------------
|
|
132 |
// CCalenIcons::CreateOutOfRangeIconsL
|
|
133 |
// Create icons for "out of range"
|
|
134 |
// (other items were commented in a header).
|
|
135 |
// -----------------------------------------------------------------------------
|
|
136 |
//
|
|
137 |
EXPORT_C CAknIconArray* CCalenIcons::CreateOutOfRangeIconsL() const
|
|
138 |
{
|
|
139 |
TRACE_ENTRY_POINT;
|
|
140 |
|
|
141 |
// Fixme: this method can be removed as there is only one icon,
|
|
142 |
// but it's better to refactor whole icon storing.
|
|
143 |
// Icons should be stored in this
|
|
144 |
// class, and other classes just have pointers here.
|
|
145 |
CAknIconArray* icons = new CAknIconArray(2);
|
|
146 |
icons->SetReserveL(2);
|
|
147 |
CleanupStack::PushL(icons);
|
|
148 |
CGulIcon* eventsBeforeIcon = GetIconL( MCalenServices::ECalenItemNotShownIcon );
|
|
149 |
CleanupStack::PushL(eventsBeforeIcon);
|
|
150 |
CGulIcon* eventsAfterIcon = GetIconL( MCalenServices::ECalenItemNotShownIcon );
|
|
151 |
CleanupStack::PushL(eventsAfterIcon);
|
|
152 |
icons->AppendL(eventsBeforeIcon);
|
|
153 |
icons->AppendL(eventsAfterIcon);
|
|
154 |
|
|
155 |
CleanupStack::Pop(3);
|
|
156 |
|
|
157 |
TRACE_EXIT_POINT;
|
|
158 |
return icons;
|
|
159 |
}
|
|
160 |
|
|
161 |
// -----------------------------------------------------------------------------
|
|
162 |
// CCalenIcons::CreateBitmapSkinnedIconL
|
|
163 |
// Create icon with bitmap skin
|
|
164 |
// (other items were commented in a header).
|
|
165 |
// -----------------------------------------------------------------------------
|
|
166 |
//
|
|
167 |
CGulIcon* CCalenIcons::CreateBitmapSkinnedIconL(const TAknsItemID& aSkinIconId,
|
|
168 |
const TDesC& aFilename,
|
|
169 |
TInt aNormalIconId,
|
|
170 |
TInt aNormalMaskId) const
|
|
171 |
{
|
|
172 |
TRACE_ENTRY_POINT;
|
|
173 |
|
|
174 |
CFbsBitmap* bitmap = NULL;
|
|
175 |
CFbsBitmap* mask = NULL;
|
|
176 |
AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), aSkinIconId,
|
|
177 |
bitmap, mask,
|
|
178 |
aFilename, aNormalIconId, aNormalMaskId);
|
|
179 |
CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
|
|
180 |
// Ownership of bitmap and mask transferred
|
|
181 |
CleanupStack::Pop(2); // bitmap, mask
|
|
182 |
|
|
183 |
TRACE_EXIT_POINT;
|
|
184 |
return icon;
|
|
185 |
}
|
|
186 |
|
|
187 |
|
|
188 |
// -----------------------------------------------------------------------------
|
|
189 |
// CCalenIcons::CreateDayWeekToDoViewIconsL
|
|
190 |
// Create a common icons array, which is used by Day/Week/Todo View
|
|
191 |
// (other items were commented in a header).
|
|
192 |
// -----------------------------------------------------------------------------
|
|
193 |
//
|
|
194 |
EXPORT_C CAknIconArray* CCalenIcons::CreateDayWeekToDoViewIconsL() const
|
|
195 |
{
|
|
196 |
TRACE_ENTRY_POINT;
|
|
197 |
|
|
198 |
CAknIconArray* icons = new( ELeave )CAknIconArray( KDayAndWeekIconCount );
|
|
199 |
CleanupStack::PushL(icons);
|
|
200 |
|
|
201 |
icons->SetReserveL( KDayAndWeekIconCount );
|
|
202 |
|
|
203 |
icons->AppendL( GetIconL( MCalenServices::ECalenMarkedTodoIcon ) );
|
|
204 |
|
|
205 |
icons->AppendL( GetIconL( MCalenServices::ECalenBirthdayIcon ) );
|
|
206 |
|
|
207 |
icons->AppendL( GetIconL( MCalenServices::ECalenMeetingIcon ) );
|
|
208 |
|
|
209 |
icons->AppendL( GetIconL( MCalenServices::ECalenDaynoteIcon ) );
|
|
210 |
|
|
211 |
icons->AppendL( GetIconL( MCalenServices::ECalenToDoIcon ) );
|
|
212 |
|
|
213 |
// Alarm and repeat icon. Color skinned with day view icon color
|
|
214 |
// FIXME: highlight coloring in lists doesn't work for icons.
|
|
215 |
// When Avkon suplies some method to do that, change these
|
|
216 |
|
|
217 |
// alarm icon
|
|
218 |
icons->AppendL( GetIconL( MCalenServices::ECalenAlarmIcon ) ); // won't leave. SetReserveL has been used
|
|
219 |
|
|
220 |
// repeat icon
|
|
221 |
|
|
222 |
icons->AppendL( GetIconL( MCalenServices::ECalenRepeatIcon ) ); // won't leave. SetReserveL has been used
|
|
223 |
|
|
224 |
// repeat exception icon
|
|
225 |
|
|
226 |
icons->AppendL( GetIconL( MCalenServices::ECalenRepeatExceptionIcon ) ); // won't leave. SetReserveL has been used
|
|
227 |
|
|
228 |
|
|
229 |
icons->AppendL( GetIconL( MCalenServices::ECalenNotePriorityLow ) ); // won't leave. SetReserveL has been used
|
|
230 |
|
|
231 |
|
|
232 |
icons->AppendL( GetIconL( MCalenServices::ECalenNotePriorityHigh ) ); // won't leave. SetReserveL has been used
|
|
233 |
|
|
234 |
icons->AppendL( GetIconL( MCalenServices::ECalenTodoIconUndone ) );
|
|
235 |
|
|
236 |
icons->AppendL( GetIconL( MCalenServices::ECalenTodoIconDone ) );
|
|
237 |
icons->AppendL( GetIconL( MCalenServices::ECalenMapIcon ) );
|
|
238 |
CleanupStack::Pop(icons); // icons
|
|
239 |
|
|
240 |
TRACE_EXIT_POINT;
|
|
241 |
return icons;
|
|
242 |
}
|
|
243 |
|
|
244 |
// ---------------------------------------------------------------------------
|
|
245 |
// CCalenIcons::CreateMonthViewIconsL
|
|
246 |
// Create icons array for month view
|
|
247 |
// (other items were commented in a header).
|
|
248 |
// ---------------------------------------------------------------------------
|
|
249 |
|
|
250 |
EXPORT_C CAknIconArray* CCalenIcons::CreateMonthViewIconsL() const
|
|
251 |
{
|
|
252 |
TRACE_ENTRY_POINT;
|
|
253 |
|
|
254 |
const TInt iconCount(2);
|
|
255 |
CAknIconArray* icons = new (ELeave) CAknIconArray(iconCount);
|
|
256 |
CleanupStack::PushL(icons);
|
|
257 |
icons->SetReserveL(iconCount);
|
|
258 |
|
|
259 |
CGulIcon* icon = GetIconL( MCalenServices::ECalenMonthManyEventIcon );
|
|
260 |
icons->AppendL(icon); // won't leave .SetReserveL reserved space
|
|
261 |
|
|
262 |
icon = GetIconL( MCalenServices::ECalenMonthGrayedEventIcon );
|
|
263 |
icons->AppendL(icon); // won't leave .SetReserveL reserved space
|
|
264 |
|
|
265 |
CleanupStack::Pop(icons);
|
|
266 |
|
|
267 |
TRACE_EXIT_POINT;
|
|
268 |
return icons;
|
|
269 |
}
|
|
270 |
|
|
271 |
|
|
272 |
// ---------------------------------------------------------
|
|
273 |
// CalenIcons::IconIndexFromEntry
|
|
274 |
// Gets an icon index corresponding to a note
|
|
275 |
// (other items were commented in a header).
|
|
276 |
// ---------------------------------------------------------
|
|
277 |
//
|
|
278 |
EXPORT_C MCalenServices::TCalenIcons CCalenIcons::IconIndexFromEntryL(CCalEntry& aEntry)
|
|
279 |
{
|
|
280 |
TRACE_ENTRY_POINT;
|
|
281 |
|
|
282 |
MCalenServices::TCalenIcons icon(MCalenServices::ECalenMeetingIcon);
|
|
283 |
|
|
284 |
switch(aEntry.EntryTypeL())
|
|
285 |
{
|
|
286 |
case CCalEntry::EAnniv:
|
|
287 |
icon = MCalenServices::ECalenBirthdayIcon;
|
|
288 |
break;
|
|
289 |
case CCalEntry::EEvent:
|
|
290 |
icon = MCalenServices::ECalenDaynoteIcon;
|
|
291 |
break;
|
|
292 |
case CCalEntry::EAppt:
|
|
293 |
icon = MCalenServices::ECalenMeetingIcon;
|
|
294 |
break;
|
|
295 |
case CCalEntry::ETodo:
|
|
296 |
icon = MCalenServices::ECalenToDoIcon;
|
|
297 |
break;
|
|
298 |
default:
|
|
299 |
ASSERT( EFalse );
|
|
300 |
break;
|
|
301 |
}
|
|
302 |
|
|
303 |
TRACE_EXIT_POINT;
|
|
304 |
return icon;
|
|
305 |
}
|
|
306 |
|
|
307 |
// ---------------------------------------------------------
|
|
308 |
// CalenIcons::GetIcon
|
|
309 |
// Gets an icon according to the icon index being passed in
|
|
310 |
// (other items were commented in a header).
|
|
311 |
// ---------------------------------------------------------
|
|
312 |
//
|
|
313 |
EXPORT_C CGulIcon* CCalenIcons::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId ) const
|
|
314 |
{
|
|
315 |
TRACE_ENTRY_POINT;
|
|
316 |
CGulIcon* icon;
|
|
317 |
// Alarm and repeat icon. Color skinned with day view icon color
|
|
318 |
// FIXME: highlight coloring in lists doesn't work for icons.
|
|
319 |
// When Avkon suplies some method to do that, change these
|
|
320 |
TAknsItemID colorGroup = KAknsIIDQsnIconColors;
|
|
321 |
TInt colorIndex = EAknsCIQsnIconColorsCG19;
|
|
322 |
TInt colorIndexToDo = EAknsCIQsnIconColorsCG13;
|
|
323 |
TRgb nonSkinColor = AKN_LAF_COLOR(215);
|
|
324 |
CFbsBitmap* bitmap = NULL;
|
|
325 |
CFbsBitmap* mask = NULL;
|
|
326 |
|
|
327 |
switch( aIndex )
|
|
328 |
{
|
|
329 |
case MCalenServices::ECalenMarkedTodoIcon:
|
|
330 |
{
|
|
331 |
TParse* fp1 = new( ELeave )TParse();
|
|
332 |
CleanupStack::PushL( fp1 );
|
|
333 |
fp1->Set( AknIconUtils::AvkonIconFileName(), &KDC_APP_BITMAP_DIR, NULL );
|
|
334 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiMarkedAdd,
|
|
335 |
fp1->FullName(),
|
|
336 |
EMbmAvkonQgn_indi_marked_add,
|
|
337 |
EMbmAvkonQgn_indi_marked_add_mask );
|
|
338 |
CleanupStack::PopAndDestroy( fp1 );
|
|
339 |
}
|
|
340 |
break;
|
|
341 |
case MCalenServices::ECalenBirthdayIcon:
|
|
342 |
{
|
|
343 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrBirthday,
|
|
344 |
iIconFile,
|
|
345 |
EMbmCalendarQgn_indi_cdr_birthday,
|
|
346 |
EMbmCalendarQgn_indi_cdr_birthday_mask );
|
|
347 |
}
|
|
348 |
break;
|
|
349 |
case MCalenServices::ECalenMeetingIcon:
|
|
350 |
{
|
|
351 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrMeeting,
|
|
352 |
iIconFile,
|
|
353 |
EMbmCalendarQgn_indi_cdr_meeting,
|
|
354 |
EMbmCalendarQgn_indi_cdr_meeting_mask );
|
|
355 |
}
|
|
356 |
break;
|
|
357 |
case MCalenServices::ECalenDaynoteIcon:
|
|
358 |
{
|
|
359 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrReminder,
|
|
360 |
iIconFile,
|
|
361 |
EMbmCalendarQgn_indi_cdr_reminder,
|
|
362 |
EMbmCalendarQgn_indi_cdr_reminder_mask );
|
|
363 |
}
|
|
364 |
break;
|
|
365 |
case MCalenServices::ECalenToDoIcon:
|
|
366 |
{
|
|
367 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrTodo,
|
|
368 |
iIconFile,
|
|
369 |
EMbmCalendarQgn_indi_cdr_todo,
|
|
370 |
EMbmCalendarQgn_indi_cdr_todo_mask );
|
|
371 |
}
|
|
372 |
break;
|
|
373 |
case MCalenServices::ECalenAlarmIcon:
|
|
374 |
{
|
|
375 |
if(aViewId == KCalenTodoViewUidValue ||
|
|
376 |
aViewId == KCalenEventViewUidValue ||
|
|
377 |
aViewId == KCalenMissedAlarmsViewUidValue ||
|
|
378 |
aViewId == KCalenMissedEventViewUidValue )
|
|
379 |
{
|
|
380 |
AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
|
|
381 |
KAknsIIDQgnIndiAlarmAdd,
|
|
382 |
colorGroup,
|
|
383 |
colorIndexToDo,
|
|
384 |
bitmap, mask,
|
|
385 |
AknIconUtils::AvkonIconFileName(),
|
|
386 |
EMbmAvkonQgn_indi_alarm_add,
|
|
387 |
EMbmAvkonQgn_indi_alarm_add_mask,
|
|
388 |
nonSkinColor);
|
|
389 |
icon = CGulIcon::NewL( bitmap, mask );
|
|
390 |
CleanupStack::Pop( 2 ); // bitmap, mask
|
|
391 |
break;
|
|
392 |
}
|
|
393 |
else
|
|
394 |
{
|
|
395 |
AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
|
|
396 |
KAknsIIDQgnIndiAlarmAdd,
|
|
397 |
colorGroup,
|
|
398 |
colorIndex,
|
|
399 |
bitmap, mask,
|
|
400 |
AknIconUtils::AvkonIconFileName(),
|
|
401 |
EMbmAvkonQgn_indi_alarm_add,
|
|
402 |
EMbmAvkonQgn_indi_alarm_add_mask,
|
|
403 |
nonSkinColor);
|
|
404 |
icon = CGulIcon::NewL( bitmap, mask );
|
|
405 |
CleanupStack::Pop( 2 ); // bitmap, mask
|
|
406 |
break;
|
|
407 |
}
|
|
408 |
}
|
|
409 |
|
|
410 |
case MCalenServices::ECalenRepeatIcon:
|
|
411 |
{
|
|
412 |
if(aViewId == KCalenTodoViewUidValue ||
|
|
413 |
aViewId == KCalenEventViewUidValue ||
|
|
414 |
aViewId == KCalenMissedAlarmsViewUidValue ||
|
|
415 |
aViewId == KCalenMissedEventViewUidValue )
|
|
416 |
{
|
|
417 |
AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
|
|
418 |
KAknsIIDQgnIndiRepeatAdd,
|
|
419 |
colorGroup,
|
|
420 |
colorIndexToDo,
|
|
421 |
bitmap, mask,
|
|
422 |
iIconFile,
|
|
423 |
EMbmCalendarQgn_indi_repeat_add,
|
|
424 |
EMbmCalendarQgn_indi_repeat_add_mask,
|
|
425 |
nonSkinColor);
|
|
426 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
427 |
CleanupStack::Pop( 2 );
|
|
428 |
break;
|
|
429 |
}
|
|
430 |
else
|
|
431 |
{
|
|
432 |
AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
|
|
433 |
KAknsIIDQgnIndiRepeatAdd,
|
|
434 |
colorGroup,
|
|
435 |
colorIndex,
|
|
436 |
bitmap, mask,
|
|
437 |
iIconFile,
|
|
438 |
EMbmCalendarQgn_indi_repeat_add,
|
|
439 |
EMbmCalendarQgn_indi_repeat_add_mask,
|
|
440 |
nonSkinColor);
|
|
441 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
442 |
CleanupStack::Pop( 2 );
|
|
443 |
break;
|
|
444 |
}
|
|
445 |
}
|
|
446 |
|
|
447 |
case MCalenServices::ECalenRepeatExceptionIcon:
|
|
448 |
{
|
|
449 |
if(aViewId == KCalenTodoViewUidValue ||
|
|
450 |
aViewId == KCalenEventViewUidValue ||
|
|
451 |
aViewId == KCalenMissedAlarmsViewUidValue ||
|
|
452 |
aViewId == KCalenMissedEventViewUidValue )
|
|
453 |
{
|
|
454 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
455 |
KAknsIIDQgnIndiRepeatExceptionAdd,
|
|
456 |
colorGroup,
|
|
457 |
colorIndexToDo,
|
|
458 |
bitmap, mask,
|
|
459 |
iIconFile,
|
|
460 |
EMbmCalendarQgn_indi_repeat_exception_add,
|
|
461 |
EMbmCalendarQgn_indi_repeat_exception_add_mask,
|
|
462 |
nonSkinColor);
|
|
463 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
464 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
465 |
break;
|
|
466 |
}
|
|
467 |
else
|
|
468 |
{
|
|
469 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
470 |
KAknsIIDQgnIndiRepeatExceptionAdd,
|
|
471 |
colorGroup,
|
|
472 |
colorIndex,
|
|
473 |
bitmap, mask,
|
|
474 |
iIconFile,
|
|
475 |
EMbmCalendarQgn_indi_repeat_exception_add,
|
|
476 |
EMbmCalendarQgn_indi_repeat_exception_add_mask,
|
|
477 |
nonSkinColor);
|
|
478 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
479 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
480 |
break;
|
|
481 |
}
|
|
482 |
|
|
483 |
}
|
|
484 |
case MCalenServices::ECalenNotePriorityLow:
|
|
485 |
{
|
|
486 |
if(aViewId == KCalenTodoViewUidValue ||
|
|
487 |
aViewId == KCalenEventViewUidValue ||
|
|
488 |
aViewId == KCalenMissedAlarmsViewUidValue ||
|
|
489 |
aViewId == KCalenMissedEventViewUidValue )
|
|
490 |
{
|
|
491 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
492 |
KAknsIIDQgnIndiTodoLowAdd,
|
|
493 |
colorGroup,
|
|
494 |
colorIndexToDo,
|
|
495 |
bitmap, mask,
|
|
496 |
iIconFile,
|
|
497 |
EMbmCalendarQgn_indi_todo_low_add,
|
|
498 |
EMbmCalendarQgn_indi_todo_low_add_mask,
|
|
499 |
nonSkinColor);
|
|
500 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
501 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
502 |
break;
|
|
503 |
}
|
|
504 |
else
|
|
505 |
{
|
|
506 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
507 |
KAknsIIDQgnIndiTodoLowAdd,
|
|
508 |
colorGroup,
|
|
509 |
colorIndex,
|
|
510 |
bitmap, mask,
|
|
511 |
iIconFile,
|
|
512 |
EMbmCalendarQgn_indi_todo_low_add,
|
|
513 |
EMbmCalendarQgn_indi_todo_low_add_mask,
|
|
514 |
nonSkinColor);
|
|
515 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
516 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
517 |
break;
|
|
518 |
}
|
|
519 |
}
|
|
520 |
|
|
521 |
case MCalenServices::ECalenNotePriorityHigh:
|
|
522 |
{
|
|
523 |
if(aViewId == KCalenTodoViewUidValue ||
|
|
524 |
aViewId == KCalenEventViewUidValue ||
|
|
525 |
aViewId == KCalenMissedAlarmsViewUidValue ||
|
|
526 |
aViewId == KCalenMissedEventViewUidValue )
|
|
527 |
{
|
|
528 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
529 |
KAknsIIDQgnIndiTodoHighAdd,
|
|
530 |
colorGroup,
|
|
531 |
colorIndexToDo,
|
|
532 |
bitmap, mask,
|
|
533 |
iIconFile,
|
|
534 |
EMbmCalendarQgn_indi_todo_high_add,
|
|
535 |
EMbmCalendarQgn_indi_todo_high_add_mask,
|
|
536 |
nonSkinColor );
|
|
537 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
538 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
539 |
break;
|
|
540 |
}
|
|
541 |
else
|
|
542 |
{
|
|
543 |
AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
|
|
544 |
KAknsIIDQgnIndiTodoHighAdd,
|
|
545 |
colorGroup,
|
|
546 |
colorIndex,
|
|
547 |
bitmap, mask,
|
|
548 |
iIconFile,
|
|
549 |
EMbmCalendarQgn_indi_todo_high_add,
|
|
550 |
EMbmCalendarQgn_indi_todo_high_add_mask,
|
|
551 |
nonSkinColor );
|
|
552 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
553 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
554 |
break;
|
|
555 |
}
|
|
556 |
}
|
|
557 |
case MCalenServices::ECalenTodoIconUndone:
|
|
558 |
{
|
|
559 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnPropTodoUndone,
|
|
560 |
iIconFile,
|
|
561 |
EMbmCalendarQgn_prop_todo_undone,
|
|
562 |
EMbmCalendarQgn_prop_todo_undone_mask );
|
|
563 |
}
|
|
564 |
break;
|
|
565 |
case MCalenServices::ECalenTodoIconDone:
|
|
566 |
{
|
|
567 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnPropTodoDone,
|
|
568 |
iIconFile,
|
|
569 |
EMbmCalendarQgn_prop_todo_done,
|
|
570 |
EMbmCalendarQgn_prop_todo_done_mask );
|
|
571 |
}
|
|
572 |
break;
|
|
573 |
case MCalenServices::ECalenItemNotShownIcon:
|
|
574 |
{
|
|
575 |
icon = CreateItemNotShownIconL();
|
|
576 |
}
|
|
577 |
break;
|
|
578 |
case MCalenServices::ECalenMonthManyEventIcon:
|
|
579 |
{
|
|
580 |
TAknsItemID skinColorComponent = KAknsIIDQsnOtherColors;
|
|
581 |
TInt focusedMonthColorGroup = EAknsCIQsnOtherColorsCG5;
|
|
582 |
|
|
583 |
AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
|
|
584 |
KAknsIIDQgnIndiCdrEventMixed,
|
|
585 |
skinColorComponent,
|
|
586 |
focusedMonthColorGroup,
|
|
587 |
bitmap, mask,
|
|
588 |
iIconFile,
|
|
589 |
EMbmCalendarQgn_indi_cdr_event_mixed,
|
|
590 |
EMbmCalendarQgn_indi_cdr_event_mixed_mask,
|
|
591 |
cell_cale_many_event_c );
|
|
592 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
593 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
594 |
}
|
|
595 |
break;
|
|
596 |
case MCalenServices::ECalenMonthGrayedEventIcon:
|
|
597 |
{
|
|
598 |
TAknsItemID skinColorComponent = KAknsIIDQsnOtherColors;
|
|
599 |
TInt unfocusedMonthColorGroup = EAknsCIQsnOtherColorsCG6;
|
|
600 |
|
|
601 |
AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
|
|
602 |
KAknsIIDQgnIndiCdrEventMixed,
|
|
603 |
skinColorComponent,
|
|
604 |
unfocusedMonthColorGroup,
|
|
605 |
bitmap, mask,
|
|
606 |
iIconFile,
|
|
607 |
EMbmCalendarQgn_indi_cdr_event_mixed,
|
|
608 |
EMbmCalendarQgn_indi_cdr_event_mixed_mask,
|
|
609 |
cell_cale_grayed_event_c );
|
|
610 |
icon = CGulIcon::NewL(bitmap, mask);
|
|
611 |
CleanupStack::Pop(2); // bitmap, mask;
|
|
612 |
}
|
|
613 |
break;
|
|
614 |
case MCalenServices::ECalenMonthViewIcon:
|
|
615 |
{
|
|
616 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbMonth,
|
|
617 |
iIconFile,
|
|
618 |
EMbmCalendarQgn_indi_cale_tb_month,
|
|
619 |
EMbmCalendarQgn_indi_cale_tb_month_mask );
|
|
620 |
}
|
|
621 |
break;
|
|
622 |
case MCalenServices::ECalenWeekViewIcon:
|
|
623 |
{
|
|
624 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbWeek,
|
|
625 |
iIconFile,
|
|
626 |
EMbmCalendarQgn_indi_cale_tb_week,
|
|
627 |
EMbmCalendarQgn_indi_cale_tb_week_mask );
|
|
628 |
}
|
|
629 |
break;
|
|
630 |
case MCalenServices::ECalenDayViewIcon:
|
|
631 |
{
|
|
632 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbDay,
|
|
633 |
iIconFile,
|
|
634 |
EMbmCalendarQgn_indi_cale_tb_day,
|
|
635 |
EMbmCalendarQgn_indi_cale_tb_day_mask );
|
|
636 |
}
|
|
637 |
break;
|
|
638 |
case MCalenServices::ECalenTodoViewIcon:
|
|
639 |
{
|
|
640 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbTodo,
|
|
641 |
iIconFile,
|
|
642 |
EMbmCalendarQgn_indi_cale_tb_todo,
|
|
643 |
EMbmCalendarQgn_indi_cale_tb_todo_mask );
|
|
644 |
}
|
|
645 |
break;
|
|
646 |
case MCalenServices::ECalenNewMeetingIcon:
|
|
647 |
{
|
|
648 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbMeetingNew,
|
|
649 |
iIconFile,
|
|
650 |
EMbmCalendarQgn_indi_cale_tb_meeting_new,
|
|
651 |
EMbmCalendarQgn_indi_cale_tb_meeting_new_mask );
|
|
652 |
}
|
|
653 |
break;
|
|
654 |
case MCalenServices::ECalenNewTodoIcon:
|
|
655 |
{
|
|
656 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbTodoNew,
|
|
657 |
iIconFile,
|
|
658 |
EMbmCalendarQgn_indi_cale_tb_todo_new,
|
|
659 |
EMbmCalendarQgn_indi_cale_tb_todo_new_mask );
|
|
660 |
}
|
|
661 |
break;
|
|
662 |
case MCalenServices::ECalenViewerEditIcon:
|
|
663 |
{
|
|
664 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiMgTbEdit,
|
|
665 |
iIconFile,
|
|
666 |
EMbmCalendarQgn_indi_mg_tb_edit,
|
|
667 |
EMbmCalendarQgn_indi_mg_tb_edit_mask );
|
|
668 |
}
|
|
669 |
break;
|
|
670 |
case MCalenServices::ECalenViewerDeleteIcon:
|
|
671 |
{
|
|
672 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiMgTbDelete,
|
|
673 |
iIconFile,
|
|
674 |
EMbmCalendarQgn_indi_mg_tb_delete,
|
|
675 |
EMbmCalendarQgn_indi_mg_tb_delete_mask );
|
|
676 |
}
|
|
677 |
break;
|
|
678 |
case MCalenServices::ECalenViewerSendIcon:
|
|
679 |
{
|
|
680 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiTbMce,
|
|
681 |
iIconFile,
|
|
682 |
EMbmCalendarQgn_indi_tb_mce,
|
|
683 |
EMbmCalendarQgn_indi_tb_mce_mask );
|
|
684 |
}
|
|
685 |
break;
|
|
686 |
case MCalenServices::ECalenMeetingIconMissed:
|
|
687 |
{
|
|
688 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrMeetingMissedNew,
|
|
689 |
iIconFile,
|
|
690 |
EMbmCalendarQgn_indi_cdr_meeting_missed_new,
|
|
691 |
EMbmCalendarQgn_indi_cdr_meeting_missed_new_mask );
|
|
692 |
}
|
|
693 |
break;
|
|
694 |
case MCalenServices::ECalenBirthdayIconMissed:
|
|
695 |
{
|
|
696 |
icon = CreateBitmapSkinnedIconL(KAknsIIDQgnIndiCdrBirthdayMissedNew,
|
|
697 |
iIconFile,
|
|
698 |
EMbmCalendarQgn_indi_cdr_birthday_missed_new,
|
|
699 |
EMbmCalendarQgn_indi_cdr_birthday_missed_new_mask );
|
|
700 |
}
|
|
701 |
break;
|
|
702 |
case MCalenServices::ECalenDaynoteIconMissed:
|
|
703 |
{
|
|
704 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrReminderMissedNew,
|
|
705 |
iIconFile,
|
|
706 |
EMbmCalendarQgn_indi_cdr_reminder_missed_new,
|
|
707 |
EMbmCalendarQgn_indi_cdr_reminder_missed_new_mask );
|
|
708 |
}
|
|
709 |
break;
|
|
710 |
case MCalenServices::ECalenToDoIconMissed:
|
|
711 |
{
|
|
712 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrTodoUndoneMissedNew,
|
|
713 |
iIconFile,
|
|
714 |
EMbmCalendarQgn_indi_cdr_todo_undone_missed_new,
|
|
715 |
EMbmCalendarQgn_indi_cdr_todo_undone_missed_new_mask );
|
|
716 |
}
|
|
717 |
break;
|
|
718 |
case MCalenServices::ECalenClearMissedAlarms:
|
|
719 |
{
|
|
720 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiTbCaleAlarmDismiss,
|
|
721 |
iIconFile,
|
|
722 |
EMbmCalendarQgn_indi_tb_cale_alarm_dismiss,
|
|
723 |
EMbmCalendarQgn_indi_tb_cale_alarm_dismiss_mask );
|
|
724 |
}
|
|
725 |
break;
|
|
726 |
case MCalenServices::ECalenClearAllMissedAlarms:
|
|
727 |
{
|
|
728 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiTbCaleAlarmDismissAll,
|
|
729 |
iIconFile,
|
|
730 |
EMbmCalendarQgn_indi_tb_cale_alarm_dismiss_all,
|
|
731 |
EMbmCalendarQgn_indi_tb_cale_alarm_dismiss_all_mask );
|
|
732 |
}
|
|
733 |
break;
|
|
734 |
case MCalenServices::ECalenMapIcon:
|
|
735 |
{
|
|
736 |
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnMenuMaps,
|
|
737 |
iIconFile,
|
|
738 |
EMbmCalendarQgn_menu_maps,
|
|
739 |
EMbmCalendarQgn_menu_maps_mask );
|
|
740 |
|
|
741 |
}
|
|
742 |
break;
|
|
743 |
case MCalenServices::ECalenSyncIcon:
|
|
744 |
{
|
|
745 |
icon = CreateBitmapSkinnedIconL(KAknsIIDQgnStatSync,
|
|
746 |
iIconFile,
|
|
747 |
EMbmCalendarQgn_stat_sync,
|
|
748 |
EMbmCalendarQgn_stat_sync_mask);
|
|
749 |
break;
|
|
750 |
}
|
|
751 |
default:
|
|
752 |
{
|
|
753 |
icon = CGulIcon::NewL( bitmap, mask );
|
|
754 |
}
|
|
755 |
break;
|
|
756 |
}
|
|
757 |
TRACE_EXIT_POINT;
|
|
758 |
return icon;
|
|
759 |
}
|
|
760 |
|
|
761 |
// End of File
|