25
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 - 2009 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: Window which draws priority and followup flags on navi
|
|
15 |
* pane area. Real navi pane is not used because there was problems to
|
|
16 |
* show editor indicator in custom navi pane.
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
// SYSTEM INCLUDES
|
|
21 |
#include <AknUtils.h>
|
|
22 |
#include <aknnavide.h> // CAknNavigationDecorator
|
|
23 |
#include <eikspane.h> // CEikStatusPane
|
|
24 |
|
|
25 |
#include <aknlayoutscalable_apps.cdl.h>
|
|
26 |
|
|
27 |
// INTERNAL INCLUDES
|
|
28 |
#include "cmailcustomstatuspaneindicators.h"
|
|
29 |
#include "ncsconstants.h" // TMsgPriority
|
|
30 |
#include "FreestyleEmailUiLayoutHandler.h"
|
|
31 |
#include "FreestyleEmailUiTextureManager.h"
|
|
32 |
#include "FreestyleEmailUiAppui.h"
|
|
33 |
#include "freestyleemailui.mbg"
|
|
34 |
|
|
35 |
// ---------------------------------------------------------------------------
|
|
36 |
// CCustomStatuspaneIndicators::CCustomStatuspaneIndicators
|
|
37 |
// ---------------------------------------------------------------------------
|
|
38 |
//
|
|
39 |
CCustomStatuspaneIndicators* CCustomStatuspaneIndicators::NewL( CEikStatusPane* aStatusPane )
|
|
40 |
{
|
|
41 |
CCustomStatuspaneIndicators* self = new (ELeave) CCustomStatuspaneIndicators;
|
|
42 |
CleanupStack::PushL( self );
|
|
43 |
self->ConstructL( aStatusPane );
|
|
44 |
CleanupStack::Pop( self );
|
|
45 |
return self;
|
|
46 |
}
|
|
47 |
|
|
48 |
// ---------------------------------------------------------------------------
|
|
49 |
// CCustomStatuspaneIndicators::CCustomStatuspaneIndicators
|
|
50 |
// ---------------------------------------------------------------------------
|
|
51 |
//
|
|
52 |
CCustomStatuspaneIndicators::CCustomStatuspaneIndicators()
|
|
53 |
{
|
|
54 |
}
|
|
55 |
|
|
56 |
// ---------------------------------------------------------------------------
|
|
57 |
// CCustomStatuspaneIndicators::~CCustomStatuspaneIndicators
|
|
58 |
// ---------------------------------------------------------------------------
|
|
59 |
//
|
|
60 |
CCustomStatuspaneIndicators::~CCustomStatuspaneIndicators()
|
|
61 |
{
|
|
62 |
delete iPriorityIconLow;
|
|
63 |
delete iPriorityIconHigh;
|
|
64 |
delete iBitmapFollowUp;
|
|
65 |
delete iBitmapFollowUpMask;
|
|
66 |
delete iBitmapFollowUpComplete;
|
|
67 |
delete iBitmapFollowUpCompleteMask;
|
|
68 |
delete iFollowUpIcon;
|
|
69 |
}
|
|
70 |
|
|
71 |
// ---------------------------------------------------------------------------
|
|
72 |
// CCustomStatuspaneIndicators::ConstructL
|
|
73 |
// ---------------------------------------------------------------------------
|
|
74 |
//
|
|
75 |
void CCustomStatuspaneIndicators::ConstructL( CEikStatusPane* aStatusPane )
|
|
76 |
{
|
|
77 |
iStatusPane = aStatusPane;
|
|
78 |
|
|
79 |
// We use normal window instead of navigation decorator because
|
|
80 |
// Editor indicator cannot be shown with custom navi pane.
|
|
81 |
// This transparent window is drawn on top of navi pane.
|
|
82 |
CreateWindowL();
|
|
83 |
SetNonFocusing();
|
|
84 |
|
|
85 |
// Read icon graphics
|
|
86 |
ConstructControlsL();
|
|
87 |
DoSetRectL();
|
|
88 |
|
|
89 |
Window().SetTransparencyAlphaChannel();
|
|
90 |
Window().SetOrdinalPosition( 0 );
|
|
91 |
ActivateL();
|
|
92 |
|
|
93 |
HideStatusPaneIndicators();
|
|
94 |
}
|
|
95 |
|
|
96 |
// ---------------------------------------------------------------------------
|
|
97 |
// CCustomStatuspaneIndicators::MinimumSize
|
|
98 |
// ---------------------------------------------------------------------------
|
|
99 |
//
|
|
100 |
|
|
101 |
TSize CCustomStatuspaneIndicators::MinimumSize()
|
|
102 |
{
|
|
103 |
return TSize( Rect().Width(), Rect().Height() );
|
|
104 |
}
|
|
105 |
|
|
106 |
// ---------------------------------------------------------------------------
|
|
107 |
// CCustomStatuspaneIndicators::CountComponentControls
|
|
108 |
// ---------------------------------------------------------------------------
|
|
109 |
//
|
|
110 |
TInt CCustomStatuspaneIndicators::CountComponentControls() const
|
|
111 |
{
|
|
112 |
TInt count( 0 );
|
|
113 |
if ( iPriorityIconLow )
|
|
114 |
{
|
|
115 |
++count;
|
|
116 |
}
|
|
117 |
if ( iPriorityIconHigh )
|
|
118 |
{
|
|
119 |
++count;
|
|
120 |
}
|
|
121 |
if ( iFollowUpIcon )
|
|
122 |
{
|
|
123 |
++count;
|
|
124 |
}
|
|
125 |
return count;
|
|
126 |
}
|
|
127 |
|
|
128 |
// ---------------------------------------------------------------------------
|
|
129 |
// CCustomStatuspaneIndicators::ComponentControl
|
|
130 |
// ---------------------------------------------------------------------------
|
|
131 |
//
|
|
132 |
CCoeControl* CCustomStatuspaneIndicators::ComponentControl( TInt aIndex ) const
|
|
133 |
{
|
|
134 |
switch ( aIndex )
|
|
135 |
{
|
|
136 |
case 0:
|
|
137 |
return iPriorityIconLow;
|
|
138 |
case 1:
|
|
139 |
return iPriorityIconHigh;
|
|
140 |
case 2:
|
|
141 |
return iFollowUpIcon;
|
|
142 |
default:
|
|
143 |
return NULL;
|
|
144 |
}
|
|
145 |
}
|
|
146 |
|
|
147 |
// ---------------------------------------------------------------------------
|
|
148 |
// CCustomStatuspaneIndicators::SizeChanged
|
|
149 |
// ---------------------------------------------------------------------------
|
|
150 |
//
|
|
151 |
void CCustomStatuspaneIndicators::SizeChanged()
|
|
152 |
{
|
|
153 |
TRect rect = Rect();
|
|
154 |
|
|
155 |
// icon area
|
|
156 |
TAknLayoutRect naviPane;
|
|
157 |
naviPane.LayoutRect( rect,
|
|
158 |
AknLayoutScalable_Apps::navi_pane_mv_g2( 3 ) );
|
|
159 |
TRect naviPaneRect( naviPane.Rect() );
|
|
160 |
|
|
161 |
// icon size
|
|
162 |
CFreestyleEmailUiAppUi* fsAppUi =
|
|
163 |
static_cast<CFreestyleEmailUiAppUi*>( ControlEnv()->AppUi() );
|
|
164 |
TSize iconSize = fsAppUi->LayoutHandler()->statusPaneIconSize();
|
|
165 |
|
|
166 |
// calculate margins
|
|
167 |
TInt marginX( Abs( naviPaneRect.Width() - iconSize.iWidth ) / 2 );
|
|
168 |
TInt marginY( Abs( naviPaneRect.Height() - iconSize.iHeight ) / 2 );
|
|
169 |
|
|
170 |
// adjust for scroll arrows
|
|
171 |
if ( CheckScrollButtonState() )
|
|
172 |
{
|
|
173 |
TAknLayoutRect leftScrollPane;
|
|
174 |
leftScrollPane.LayoutRect( rect,
|
|
175 |
AknLayoutScalable_Apps::navi_pane_g2( 5 ) );
|
|
176 |
|
|
177 |
marginX -= leftScrollPane.Rect().Width();
|
|
178 |
}
|
|
179 |
|
|
180 |
if( iPriorityIconLow )
|
|
181 |
{
|
|
182 |
AknLayoutUtils::SAknLayoutRect layout;
|
|
183 |
layout.iC=ELayoutEmpty;
|
|
184 |
layout.iL=naviPaneRect.iTl.iX + marginX; // X
|
|
185 |
layout.iT=naviPaneRect.iTl.iY + marginY; // Y
|
|
186 |
layout.iR=ELayoutEmpty; // r-border
|
|
187 |
layout.iB=ELayoutEmpty; // y-border
|
|
188 |
layout.iW=iconSize.iWidth; // Width
|
|
189 |
layout.iH=iconSize.iHeight; // Height
|
|
190 |
|
|
191 |
AknLayoutUtils::LayoutImage( iPriorityIconLow, rect, layout );
|
|
192 |
}
|
|
193 |
if( iPriorityIconHigh )
|
|
194 |
{
|
|
195 |
AknLayoutUtils::SAknLayoutRect layout;
|
|
196 |
layout.iC=ELayoutEmpty;
|
|
197 |
layout.iL=naviPaneRect.iTl.iX + marginX;
|
|
198 |
layout.iT=naviPaneRect.iTl.iY + marginY;
|
|
199 |
layout.iR=ELayoutEmpty;
|
|
200 |
layout.iB=ELayoutEmpty;
|
|
201 |
layout.iW=iconSize.iWidth;
|
|
202 |
layout.iH=iconSize.iHeight;
|
|
203 |
|
|
204 |
AknLayoutUtils::LayoutImage( iPriorityIconHigh, rect, layout );
|
|
205 |
}
|
|
206 |
if( iFollowUpIcon )
|
|
207 |
{
|
|
208 |
AknLayoutUtils::SAknLayoutRect layout;
|
|
209 |
layout.iC=ELayoutEmpty;
|
|
210 |
layout.iL=iconSize.iWidth + naviPaneRect.iTl.iX + marginX;
|
|
211 |
layout.iT=naviPaneRect.iTl.iY + marginY;
|
|
212 |
layout.iR=ELayoutEmpty;
|
|
213 |
layout.iB=ELayoutEmpty;
|
|
214 |
layout.iW=iconSize.iWidth;
|
|
215 |
layout.iH=iconSize.iHeight;
|
|
216 |
|
|
217 |
AknLayoutUtils::LayoutImage( iFollowUpIcon, rect, layout );
|
|
218 |
}
|
|
219 |
}
|
|
220 |
|
|
221 |
// ---------------------------------------------------------------------------
|
|
222 |
// CCustomStatuspaneIndicators::HandleResourceChange
|
|
223 |
// ---------------------------------------------------------------------------
|
|
224 |
//
|
|
225 |
void CCustomStatuspaneIndicators::HandleResourceChange( TInt aType )
|
|
226 |
{
|
|
227 |
CCoeControl::HandleResourceChange( aType );
|
|
228 |
|
|
229 |
switch ( aType )
|
|
230 |
{
|
|
231 |
case KAknsMessageSkinChange:
|
|
232 |
case KEikMessageColorSchemeChange:
|
|
233 |
{
|
|
234 |
TRAP_IGNORE(ConstructControlsL());
|
|
235 |
}
|
|
236 |
case KEikDynamicLayoutVariantSwitch:
|
|
237 |
case KAknLocalZoomLayoutSwitch:
|
|
238 |
{
|
|
239 |
// Get new navipane rect
|
|
240 |
TRAP_IGNORE( DoSetRectL() );
|
|
241 |
SizeChanged();
|
|
242 |
break;
|
|
243 |
}
|
|
244 |
default:
|
|
245 |
{
|
|
246 |
break;
|
|
247 |
}
|
|
248 |
}
|
|
249 |
}
|
|
250 |
|
|
251 |
// ---------------------------------------------------------------------------
|
|
252 |
// CCustomStatuspaneIndicators::SetPriorityFlag
|
|
253 |
// ---------------------------------------------------------------------------
|
|
254 |
//
|
|
255 |
void CCustomStatuspaneIndicators::SetPriorityFlag( TMsgPriority aFlagType )
|
|
256 |
{
|
|
257 |
if ( iPriorityIconHigh && iPriorityIconLow )
|
|
258 |
{
|
|
259 |
switch ( aFlagType )
|
|
260 |
{
|
|
261 |
case EMsgPriorityLow:
|
|
262 |
{
|
|
263 |
iPriorityIconLow->MakeVisible( ETrue );
|
|
264 |
iPriorityIconHigh->MakeVisible( EFalse );
|
|
265 |
break;
|
|
266 |
}
|
|
267 |
case EMsgPriorityHigh:
|
|
268 |
{
|
|
269 |
iPriorityIconLow->MakeVisible( EFalse );
|
|
270 |
iPriorityIconHigh->MakeVisible( ETrue );
|
|
271 |
break;
|
|
272 |
}
|
|
273 |
default: // EMsgPriorityNormal
|
|
274 |
{
|
|
275 |
// Normal priority -> icons not visible
|
|
276 |
iPriorityIconLow->MakeVisible( EFalse );
|
|
277 |
iPriorityIconHigh->MakeVisible( EFalse );
|
|
278 |
}
|
|
279 |
}
|
|
280 |
DrawNow();
|
|
281 |
}
|
|
282 |
}
|
|
283 |
|
|
284 |
// ---------------------------------------------------------------------------
|
|
285 |
// CCustomStatuspaneIndicators::SetFollowUpFlag
|
|
286 |
// ---------------------------------------------------------------------------
|
|
287 |
//
|
|
288 |
void CCustomStatuspaneIndicators::SetFollowUpFlag( CCustomStatuspaneIndicators::TFollowUpFlagType aFlag )
|
|
289 |
{
|
|
290 |
CFreestyleEmailUiAppUi* fsAppUi =
|
|
291 |
static_cast<CFreestyleEmailUiAppUi*>( ControlEnv()->AppUi() );
|
|
292 |
TSize iconSize = fsAppUi->LayoutHandler()->statusPaneIconSize();
|
|
293 |
|
|
294 |
if ( iFollowUpIcon )
|
|
295 |
{
|
|
296 |
switch (aFlag)
|
|
297 |
{
|
|
298 |
case EFollowUp:
|
|
299 |
{
|
|
300 |
AknIconUtils::SetSize( iBitmapFollowUp, iconSize, EAspectRatioPreserved );
|
|
301 |
iFollowUpIcon->SetPicture(iBitmapFollowUp, iBitmapFollowUpMask);
|
|
302 |
iFollowUpIcon->SetBrushStyle( CWindowGc::ENullBrush );
|
|
303 |
iFollowUpIcon->SetSize( iconSize );
|
|
304 |
}
|
|
305 |
break;
|
|
306 |
case EFollowUpComplete:
|
|
307 |
{
|
|
308 |
AknIconUtils::SetSize( iBitmapFollowUpComplete, iconSize, EAspectRatioPreserved );
|
|
309 |
iFollowUpIcon->SetPicture(iBitmapFollowUpComplete, iBitmapFollowUpCompleteMask);
|
|
310 |
iFollowUpIcon->SetBrushStyle( CWindowGc::ENullBrush );
|
|
311 |
iFollowUpIcon->SetSize( iconSize );
|
|
312 |
}
|
|
313 |
break;
|
|
314 |
case EFollowUpNone:
|
|
315 |
{
|
|
316 |
|
|
317 |
}
|
|
318 |
break;
|
|
319 |
}
|
|
320 |
iFollowUpIcon->MakeVisible( aFlag != EFollowUpNone );
|
|
321 |
DrawDeferred();
|
|
322 |
}
|
|
323 |
}
|
|
324 |
|
|
325 |
// ---------------------------------------------------------------------------
|
|
326 |
// CCustomStatuspaneIndicators::ClearStatusPaneFlags
|
|
327 |
// ---------------------------------------------------------------------------
|
|
328 |
//
|
|
329 |
void CCustomStatuspaneIndicators::ClearStatusPaneFlags()
|
|
330 |
{
|
|
331 |
SetPriorityFlag( EMsgPriorityNormal );
|
|
332 |
SetFollowUpFlag( EFollowUpNone );
|
|
333 |
}
|
|
334 |
|
|
335 |
// ---------------------------------------------------------------------------
|
|
336 |
// CCustomStatuspaneIndicators::HideStatusPaneIndicatorsL
|
|
337 |
// ---------------------------------------------------------------------------
|
|
338 |
//
|
|
339 |
void CCustomStatuspaneIndicators::HideStatusPaneIndicators()
|
|
340 |
{
|
|
341 |
MakeVisible( EFalse );
|
|
342 |
DrawNow();
|
|
343 |
}
|
|
344 |
|
|
345 |
// ---------------------------------------------------------------------------
|
|
346 |
// CCustomStatuspaneIndicators::ShowStatusPaneIndicatorsL
|
|
347 |
// ---------------------------------------------------------------------------
|
|
348 |
//
|
|
349 |
void CCustomStatuspaneIndicators::ShowStatusPaneIndicators()
|
|
350 |
{
|
|
351 |
MakeVisible( ETrue );
|
|
352 |
TRAP_IGNORE( DoSetRectL() );
|
|
353 |
DrawNow();
|
|
354 |
}
|
|
355 |
|
|
356 |
// ---------------------------------------------------------------------------
|
|
357 |
// CCustomStatuspaneIndicators::Draw
|
|
358 |
// ---------------------------------------------------------------------------
|
|
359 |
//
|
|
360 |
void CCustomStatuspaneIndicators::Draw( const TRect& aRect ) const
|
|
361 |
{
|
|
362 |
SystemGc().SetBrushColor( KRgbTransparent );
|
|
363 |
SystemGc().Clear( aRect );
|
|
364 |
}
|
|
365 |
|
|
366 |
// ---------------------------------------------------------------------------
|
|
367 |
// CCustomStatuspaneIndicators::CheckScrollButtonState
|
|
368 |
// ---------------------------------------------------------------------------
|
|
369 |
//
|
|
370 |
TBool CCustomStatuspaneIndicators::CheckScrollButtonState()
|
|
371 |
{
|
|
372 |
CAknNavigationControlContainer* NaviPane = NULL;
|
|
373 |
TRAP_IGNORE( NaviPane = (CAknNavigationControlContainer*)
|
|
374 |
iStatusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
|
|
375 |
CAknNavigationDecorator* NaviDecorator = NaviPane->Top();
|
|
376 |
if ( NaviDecorator )
|
|
377 |
{
|
|
378 |
return NaviDecorator->ScrollButtonVisible();
|
|
379 |
}
|
|
380 |
return EFalse;
|
|
381 |
}
|
|
382 |
|
|
383 |
// ---------------------------------------------------------------------------
|
|
384 |
// CCustomStatuspaneIndicators::DoSetRectL
|
|
385 |
// ---------------------------------------------------------------------------
|
|
386 |
//
|
|
387 |
void CCustomStatuspaneIndicators::DoSetRectL()
|
|
388 |
{
|
|
389 |
TRect rect = iStatusPane->PaneRectL( TUid::Uid( EEikStatusPaneUidNavi ) );
|
|
390 |
|
|
391 |
// adjust for scroll arrows (to avoid overlapping the scrolling arrows)
|
|
392 |
if ( CheckScrollButtonState() )
|
|
393 |
{
|
|
394 |
TAknLayoutRect leftScrollPane;
|
|
395 |
leftScrollPane.LayoutRect( rect,
|
|
396 |
AknLayoutScalable_Apps::navi_pane_g2( 5 ) );
|
|
397 |
|
|
398 |
rect.iTl.iX += leftScrollPane.Rect().Width();
|
|
399 |
|
|
400 |
TAknLayoutRect rightScrollPane;
|
|
401 |
rightScrollPane.LayoutRect( rect,
|
|
402 |
AknLayoutScalable_Apps::navi_pane_g3( 5 ) );
|
|
403 |
|
|
404 |
rect.iBr.iX -= rightScrollPane.Rect().Width();
|
|
405 |
}
|
|
406 |
SetRect( rect );
|
|
407 |
}
|
|
408 |
|
|
409 |
// ---------------------------------------------------------------------------
|
|
410 |
// CCustomStatuspaneIndicators::ConstructControlsL
|
|
411 |
// ---------------------------------------------------------------------------
|
|
412 |
//
|
|
413 |
void CCustomStatuspaneIndicators::ConstructControlsL()
|
|
414 |
{
|
|
415 |
CCustomStatuspaneIndicators::TFollowUpFlagType followUpFlagType = CCustomStatuspaneIndicators::EFollowUpNone;
|
|
416 |
TMsgPriority priorityIconType = EMsgPriorityNormal;
|
|
417 |
if (iPriorityIconLow && iPriorityIconLow->IsVisible())
|
|
418 |
{
|
|
419 |
priorityIconType = EMsgPriorityLow;
|
|
420 |
}
|
|
421 |
else if (iPriorityIconHigh && iPriorityIconHigh->IsVisible())
|
|
422 |
{
|
|
423 |
priorityIconType = EMsgPriorityHigh;
|
|
424 |
}
|
|
425 |
|
|
426 |
if (iFollowUpIcon)
|
|
427 |
{
|
|
428 |
if (iFollowUpIcon->Bitmap() == iBitmapFollowUp)
|
|
429 |
{
|
|
430 |
followUpFlagType = CCustomStatuspaneIndicators::EFollowUp;
|
|
431 |
}
|
|
432 |
else if (iFollowUpIcon->Bitmap() == iBitmapFollowUpComplete)
|
|
433 |
{
|
|
434 |
followUpFlagType = CCustomStatuspaneIndicators::EFollowUpComplete;
|
|
435 |
}
|
|
436 |
}
|
|
437 |
|
|
438 |
delete iPriorityIconLow;
|
|
439 |
iPriorityIconLow = NULL;
|
|
440 |
delete iPriorityIconHigh;
|
|
441 |
iPriorityIconHigh = NULL;
|
|
442 |
delete iFollowUpIcon;
|
|
443 |
iFollowUpIcon = NULL;
|
|
444 |
iBitmapPriorityLow = NULL;
|
|
445 |
iBitmapMaskPriorityLow = NULL;
|
|
446 |
iBitmapPriorityHigh = NULL;
|
|
447 |
iBitmapMaskPriorityHigh = NULL;
|
|
448 |
delete iBitmapFollowUp;
|
|
449 |
iBitmapFollowUp = NULL;
|
|
450 |
delete iBitmapFollowUpMask;
|
|
451 |
iBitmapFollowUpMask = NULL;
|
|
452 |
delete iBitmapFollowUpComplete;
|
|
453 |
iBitmapFollowUpComplete = NULL;
|
|
454 |
delete iBitmapFollowUpCompleteMask;
|
|
455 |
iBitmapFollowUpCompleteMask = NULL;
|
|
456 |
|
|
457 |
CFreestyleEmailUiAppUi* fsAppUi =
|
|
458 |
static_cast<CFreestyleEmailUiAppUi*>( ControlEnv()->AppUi() );
|
|
459 |
fsAppUi->FsTextureManager()->ProvideBitmapL(
|
|
460 |
EComposerTexturePriorityLow,
|
|
461 |
iBitmapPriorityLow,
|
|
462 |
iBitmapMaskPriorityLow );
|
|
463 |
fsAppUi->FsTextureManager()->ProvideBitmapL(
|
|
464 |
EComposerTexturePriorityHigh,
|
|
465 |
iBitmapPriorityHigh,
|
|
466 |
iBitmapMaskPriorityHigh );
|
|
467 |
fsAppUi->FsTextureManager()->ProvideBitmapL(
|
|
468 |
EFollowUpFlag,
|
|
469 |
iBitmapFollowUp,
|
|
470 |
iBitmapFollowUpMask );
|
|
471 |
fsAppUi->FsTextureManager()->ProvideBitmapL(
|
|
472 |
EFollowUpFlagComplete,
|
|
473 |
iBitmapFollowUpComplete,
|
|
474 |
iBitmapFollowUpCompleteMask );
|
|
475 |
|
|
476 |
TSize iconSize = fsAppUi->LayoutHandler()->statusPaneIconSize();
|
|
477 |
|
|
478 |
if ( iBitmapPriorityLow && iBitmapMaskPriorityLow )
|
|
479 |
{
|
|
480 |
iPriorityIconLow = new (ELeave) CEikImage;
|
|
481 |
iPriorityIconLow->SetPictureOwnedExternally( EFalse );
|
|
482 |
AknIconUtils::SetSize( iBitmapPriorityLow, iconSize, EAspectRatioPreserved );
|
|
483 |
iPriorityIconLow->SetPicture( iBitmapPriorityLow,
|
|
484 |
iBitmapMaskPriorityLow );
|
|
485 |
iPriorityIconLow->SetBrushStyle( CWindowGc::ENullBrush );
|
|
486 |
iPriorityIconLow->SetSize( iconSize );
|
|
487 |
iPriorityIconLow->SetContainerWindowL( *this );
|
|
488 |
iPriorityIconLow->MakeVisible(priorityIconType == EMsgPriorityLow);
|
|
489 |
}
|
|
490 |
if ( iBitmapPriorityHigh && iBitmapMaskPriorityHigh )
|
|
491 |
{
|
|
492 |
iPriorityIconHigh = new (ELeave) CEikImage;
|
|
493 |
iPriorityIconHigh->SetPictureOwnedExternally( EFalse );
|
|
494 |
AknIconUtils::SetSize( iBitmapPriorityHigh, iconSize, EAspectRatioPreserved );
|
|
495 |
iPriorityIconHigh->SetPicture( iBitmapPriorityHigh,
|
|
496 |
iBitmapMaskPriorityHigh );
|
|
497 |
iPriorityIconHigh->SetBrushStyle( CWindowGc::ENullBrush );
|
|
498 |
iPriorityIconHigh->SetSize( iconSize );
|
|
499 |
iPriorityIconHigh->SetContainerWindowL( *this );
|
|
500 |
iPriorityIconHigh->MakeVisible(priorityIconType == EMsgPriorityHigh);
|
|
501 |
}
|
|
502 |
if ( iBitmapFollowUp && iBitmapFollowUpMask && iBitmapFollowUpComplete && iBitmapFollowUpCompleteMask )
|
|
503 |
{
|
|
504 |
iFollowUpIcon = new (ELeave) CEikImage;
|
|
505 |
iFollowUpIcon->SetPictureOwnedExternally( ETrue );
|
|
506 |
if (followUpFlagType == CCustomStatuspaneIndicators::EFollowUp)
|
|
507 |
{
|
|
508 |
AknIconUtils::SetSize( iBitmapFollowUp, iconSize, EAspectRatioNotPreserved );
|
|
509 |
iFollowUpIcon->SetPicture( iBitmapFollowUp,
|
|
510 |
iBitmapFollowUpMask );
|
|
511 |
}
|
|
512 |
else if (followUpFlagType == CCustomStatuspaneIndicators::EFollowUpComplete)
|
|
513 |
{
|
|
514 |
AknIconUtils::SetSize( iBitmapFollowUpComplete, iconSize, EAspectRatioNotPreserved );
|
|
515 |
iFollowUpIcon->SetPicture( iBitmapFollowUpComplete,
|
|
516 |
iBitmapFollowUpCompleteMask );
|
|
517 |
}
|
|
518 |
iFollowUpIcon->SetBrushStyle( CWindowGc::ENullBrush );
|
|
519 |
iFollowUpIcon->SetSize( iconSize );
|
|
520 |
iFollowUpIcon->SetContainerWindowL( *this );
|
|
521 |
iFollowUpIcon->MakeVisible(followUpFlagType != CCustomStatuspaneIndicators::EFollowUpNone);
|
|
522 |
}
|
|
523 |
DrawDeferred();
|
|
524 |
}
|