13 * |
13 * |
14 * Description: Navipane renderer. |
14 * Description: Navipane renderer. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 // System includes |
19 #include <aipropertyextension.h> |
|
20 #include <centralrepository.h> |
19 #include <centralrepository.h> |
21 #include <ProfileEngineSDKCRKeys.h> |
20 #include <ProfileEngineSDKCRKeys.h> |
|
21 |
|
22 // User includes |
|
23 #include <hscontentpublisher.h> |
|
24 #include <hspublisherinfo.h> |
22 |
25 |
23 #include "ainavipanerenderer.h" |
26 #include "ainavipanerenderer.h" |
24 #include "ainavipaneanimator.h" |
27 #include "ainavipaneanimator.h" |
25 #include "aistatuspanel.h" |
28 #include "aistatuspanel.h" |
26 #include "ainativeuimodel.h" |
29 #include "ainativeuimodel.h" |
29 #include <aicontentrequest.h> |
32 #include <aicontentrequest.h> |
30 #include "debug.h" |
33 #include "debug.h" |
31 |
34 |
32 using namespace AiNativeUiController; |
35 using namespace AiNativeUiController; |
33 |
36 |
34 |
37 // ---------------------------------------------------------------------------- |
|
38 // CAiNaviPaneRenderer::ConstructL() |
|
39 // |
|
40 // ---------------------------------------------------------------------------- |
|
41 // |
35 void CAiNaviPaneRenderer::ConstructL() |
42 void CAiNaviPaneRenderer::ConstructL() |
36 { |
43 { |
37 iAnimator = CAiNaviPaneAnimator::NewL( iStatusPanel, |
44 iAnimator = CAiNaviPaneAnimator::NewL( iStatusPanel, |
38 iRenderingPriorities, |
45 iRenderingPriorities, |
39 *this ); |
46 *this ); |
40 iProfileText = HBufC::NewL(0); |
47 iProfileText = HBufC::NewL(0); |
41 iSilentIndicator = HBufC::NewL(0); |
48 iSilentIndicator = HBufC::NewL(0); |
42 } |
49 } |
43 |
50 |
44 |
51 // ---------------------------------------------------------------------------- |
|
52 // CAiNaviPaneRenderer::NewLC() |
|
53 // |
|
54 // ---------------------------------------------------------------------------- |
|
55 // |
45 CAiNaviPaneRenderer* CAiNaviPaneRenderer::NewLC( |
56 CAiNaviPaneRenderer* CAiNaviPaneRenderer::NewLC( |
46 CAiStatusPanel& aStatusPanel ) |
57 CAiStatusPanel& aStatusPanel ) |
47 { |
58 { |
48 CAiNaviPaneRenderer* self = new( ELeave ) CAiNaviPaneRenderer( aStatusPanel ); |
59 CAiNaviPaneRenderer* self = |
|
60 new( ELeave ) CAiNaviPaneRenderer( aStatusPanel ); |
49 CleanupStack::PushL( self ); |
61 CleanupStack::PushL( self ); |
50 self->ConstructL(); |
62 self->ConstructL(); |
51 return self; |
63 return self; |
52 } |
64 } |
53 |
65 |
54 |
66 // ---------------------------------------------------------------------------- |
|
67 // CAiNaviPaneRenderer::~CAiNaviPaneRenderer() |
|
68 // |
|
69 // ---------------------------------------------------------------------------- |
|
70 // |
55 CAiNaviPaneRenderer::~CAiNaviPaneRenderer() |
71 CAiNaviPaneRenderer::~CAiNaviPaneRenderer() |
56 { |
72 { |
57 delete iAnimator; |
73 delete iAnimator; |
58 delete iProfileText; |
74 delete iProfileText; |
59 delete iSilentIndicator; |
75 delete iSilentIndicator; |
60 delete iTimedProfileIndicator; |
76 delete iTimedProfileIndicator; |
61 } |
77 } |
62 |
78 |
63 |
79 // ---------------------------------------------------------------------------- |
|
80 // CAiNaviPaneRenderer::CAiNaviPaneRenderer() |
|
81 // |
|
82 // ---------------------------------------------------------------------------- |
|
83 // |
64 CAiNaviPaneRenderer::CAiNaviPaneRenderer( CAiStatusPanel& aStatusPanel ) |
84 CAiNaviPaneRenderer::CAiNaviPaneRenderer( CAiStatusPanel& aStatusPanel ) |
65 : iStatusPanel( aStatusPanel ), |
85 : iStatusPanel( aStatusPanel ), |
66 iRenderingPriorities( AiNativeUiModel::RenderingPriorities( AiNativeUiModel::KNaviPaneId ) ), |
86 iRenderingPriorities( AiNativeUiModel::RenderingPriorities( AiNativeUiModel::KNaviPaneId ) ), |
67 iCurrentContent(KAiNullContentId), |
87 iCurrentContent(KAiNullContentId), |
68 iCurrentPriority(AiNativeUiModel::KNoPriority) |
88 iCurrentPriority(AiNativeUiModel::KNoPriority) |
69 { |
89 { |
70 } |
90 } |
71 |
91 |
72 |
92 // ---------------------------------------------------------------------------- |
73 void CAiNaviPaneRenderer::DoPublishL( MAiPropertyExtension& aPlugin, |
93 // CAiNaviPaneRenderer::DoPublishL() |
74 TInt aContent, |
94 // |
75 const TDesC16& aText, |
95 // ---------------------------------------------------------------------------- |
76 TInt /*aIndex*/ ) |
96 // |
77 { |
97 void CAiNaviPaneRenderer::DoPublishL( CHsContentPublisher& aPlugin, |
78 if( aPlugin.PublisherInfoL()->iUid == KDeviceStatusPluginUid ) |
98 TInt aContent, const TDesC16& aText, TInt /*aIndex*/ ) |
|
99 { |
|
100 const THsPublisherInfo& info( aPlugin.PublisherInfo() ); |
|
101 |
|
102 if( info.Uid() == KDeviceStatusPluginUid ) |
79 { |
103 { |
80 switch( aContent ) |
104 switch( aContent ) |
81 { |
105 { |
82 // FALLTHROUGH |
106 // FALLTHROUGH |
83 case EAiDeviceStatusContentDate: |
107 case EAiDeviceStatusContentDate: |
347 User::Leave( KErrNotFound ); |
383 User::Leave( KErrNotFound ); |
348 } |
384 } |
349 |
385 |
350 } |
386 } |
351 |
387 |
352 |
388 // ---------------------------------------------------------------------------- |
|
389 // CAiNaviPaneRenderer::FocusObtainedL() |
|
390 // |
|
391 // ---------------------------------------------------------------------------- |
|
392 // |
353 void CAiNaviPaneRenderer::FocusObtainedL() |
393 void CAiNaviPaneRenderer::FocusObtainedL() |
354 { |
394 { |
355 if( !iStatusPanel.IsKeyLockEnabled() ) |
395 if( !iStatusPanel.IsKeyLockEnabled() ) |
356 { |
396 { |
357 iAnimator->AnimateL(); |
397 iAnimator->AnimateL(); |
358 } |
398 } |
359 iFocusObtained = ETrue; |
399 iFocusObtained = ETrue; |
360 } |
400 } |
361 |
401 |
362 |
402 // ---------------------------------------------------------------------------- |
|
403 // CAiNaviPaneRenderer::FocusLostL() |
|
404 // |
|
405 // ---------------------------------------------------------------------------- |
|
406 // |
363 void CAiNaviPaneRenderer::FocusLostL() |
407 void CAiNaviPaneRenderer::FocusLostL() |
364 { |
408 { |
365 iAnimator->CancelAnimationL(); |
409 iAnimator->CancelAnimationL(); |
366 iFocusObtained = EFalse; |
410 iFocusObtained = EFalse; |
367 iCommitted = EFalse; |
411 iCommitted = EFalse; |
368 } |
412 } |
369 |
413 |
370 |
414 // ---------------------------------------------------------------------------- |
|
415 // CAiNaviPaneRenderer::KeylockDisabledL() |
|
416 // |
|
417 // ---------------------------------------------------------------------------- |
|
418 // |
371 void CAiNaviPaneRenderer::KeylockDisabledL() |
419 void CAiNaviPaneRenderer::KeylockDisabledL() |
372 { |
420 { |
373 iAnimator->AnimateL(); |
421 iAnimator->AnimateL(); |
374 } |
422 } |
375 |
423 |
376 |
424 // ---------------------------------------------------------------------------- |
|
425 // CAiNaviPaneRenderer::KeylockEnabledL() |
|
426 // |
|
427 // ---------------------------------------------------------------------------- |
|
428 // |
377 void CAiNaviPaneRenderer::KeylockEnabledL() |
429 void CAiNaviPaneRenderer::KeylockEnabledL() |
378 { |
430 { |
379 iAnimator->CancelAnimationL(); |
431 iAnimator->CancelAnimationL(); |
380 } |
432 } |
381 |
433 |
382 |
434 // ---------------------------------------------------------------------------- |
|
435 // CAiNaviPaneRenderer::TransactionCommittedL() |
|
436 // |
|
437 // ---------------------------------------------------------------------------- |
|
438 // |
383 void CAiNaviPaneRenderer::TransactionCommittedL() |
439 void CAiNaviPaneRenderer::TransactionCommittedL() |
384 { |
440 { |
385 if( iIsChanged ) |
441 if( iIsChanged ) |
386 { |
442 { |
387 if( iFocusObtained && !iCommitted && !iStatusPanel.IsKeyLockEnabled() ) |
443 if( iFocusObtained && !iCommitted && !iStatusPanel.IsKeyLockEnabled() ) |