|
1 /* |
|
2 * Copyright (c) 2007 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <activepalette2factory.h> |
|
20 |
|
21 #include "ActivePalette2Cfg.h" |
|
22 #include "activepalette2configuration.h" |
|
23 |
|
24 |
|
25 CActivePalette2Configuration* |
|
26 CActivePalette2Configuration::NewL( TActivePalette2DrawMode aDrawMode ) |
|
27 { |
|
28 CActivePalette2Configuration* self = |
|
29 new (ELeave) CActivePalette2Configuration( aDrawMode ); |
|
30 |
|
31 CleanupStack::PushL( self ); |
|
32 self->ConstructL(); |
|
33 CleanupStack::Pop( self ); |
|
34 |
|
35 return self; |
|
36 } |
|
37 |
|
38 CActivePalette2Configuration |
|
39 ::CActivePalette2Configuration( TActivePalette2DrawMode aDrawMode ) |
|
40 : iDrawMode( aDrawMode ) |
|
41 { |
|
42 } |
|
43 |
|
44 void |
|
45 CActivePalette2Configuration::ConstructL() |
|
46 { |
|
47 } |
|
48 |
|
49 CActivePalette2Configuration::~CActivePalette2Configuration() |
|
50 { |
|
51 } |
|
52 |
|
53 |
|
54 void |
|
55 CActivePalette2Configuration |
|
56 ::TooltipConfiguration( TActivePalette2TooltipConfig& aTooltipTimes ) |
|
57 { |
|
58 switch( iDrawMode ) |
|
59 { |
|
60 case EAP2DrawModeSemiTransparentTooltipModeFading: |
|
61 |
|
62 aTooltipTimes.iPreshowDelay = NAP2Cfg::KTooltipPreshowDelayFading; |
|
63 aTooltipTimes.iFullshowPeriod = NAP2Cfg::KTooltipFullshowPeriodFading; |
|
64 aTooltipTimes.iTimerTickLength = NAP2Cfg::KTooltipTimerTickLengthFading; |
|
65 aTooltipTimes.iTransitionSpeed = KErrNotSupported; |
|
66 aTooltipTimes.iTransitionFrames = NAP2Cfg::KTooltipFadingSteps; |
|
67 |
|
68 break; |
|
69 |
|
70 case EAP2DrawModeSemiTransparent: |
|
71 case EAP2DrawModeCheckerboard: |
|
72 case EAP2DrawModeOpaque: |
|
73 default: |
|
74 |
|
75 aTooltipTimes.iPreshowDelay = NAP2Cfg::KTooltipPreshowDelay; |
|
76 aTooltipTimes.iFullshowPeriod = NAP2Cfg::KTooltipFullshowPeriod; |
|
77 aTooltipTimes.iTimerTickLength = NAP2Cfg::KTooltipTimerTickLength; |
|
78 aTooltipTimes.iTransitionSpeed = NAP2Cfg::KTooltipShowSpeed; |
|
79 aTooltipTimes.iTransitionFrames = KErrNotSupported; |
|
80 |
|
81 break; |
|
82 } |
|
83 } |