|
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: Set coefficient layout |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "glxsetcoefficientlayout.h" |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // Constructor |
|
25 // ----------------------------------------------------------------------------- |
|
26 EXPORT_C TGlxSetCoefficientLayout::TGlxSetCoefficientLayout() |
|
27 { |
|
28 __DEBUG_ONLY( _iName = _L( "TGlxSetCoefficientLayout" ) ); |
|
29 |
|
30 // by default set all coefficients |
|
31 iType = TGlxLayoutInfo::ELastEnum; |
|
32 } |
|
33 |
|
34 // ----------------------------------------------------------------------------- |
|
35 // Destructor |
|
36 // ----------------------------------------------------------------------------- |
|
37 EXPORT_C TGlxSetCoefficientLayout::~TGlxSetCoefficientLayout() |
|
38 { |
|
39 // Do nothing |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // SetType |
|
44 // ----------------------------------------------------------------------------- |
|
45 EXPORT_C void TGlxSetCoefficientLayout::SetType( TGlxLayoutInfo::TLayoutType aType ) |
|
46 { |
|
47 iType = aType; |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // SetCoefficient |
|
52 // ----------------------------------------------------------------------------- |
|
53 EXPORT_C void TGlxSetCoefficientLayout::SetCoefficient( |
|
54 TReal32 aCoefficient, TInt aMilliseconds) |
|
55 { |
|
56 // iCoefficient.Set( aCoefficient, aMilliseconds ); |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // DoMapValue |
|
61 // ----------------------------------------------------------------------------- |
|
62 void TGlxSetCoefficientLayout::DoSetLayoutValues( TGlxLayoutInfo& aInfo ) |
|
63 { |
|
64 // set coefficient |
|
65 if( iType == TGlxLayoutInfo::ELastEnum ) |
|
66 { |
|
67 // set them all |
|
68 for( TInt i = 0; i < TGlxLayoutInfo::ELastEnum; i++ ) |
|
69 { |
|
70 // need to cast the index to enum type for the compiler to be happy |
|
71 // aInfo.SetCoefficient( |
|
72 // (TGlxLayoutInfo::TLayoutType)i, iCoefficient.Now() ); |
|
73 } |
|
74 } |
|
75 else |
|
76 { |
|
77 // just set the one specified |
|
78 // aInfo.SetCoefficient( iType, iCoefficient.Now() ); |
|
79 } |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // DoChanged |
|
84 // ----------------------------------------------------------------------------- |
|
85 TBool TGlxSetCoefficientLayout::DoChanged() const |
|
86 { |
|
87 // return iCoefficient.Changed(); |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // DoClearChanged |
|
92 // ----------------------------------------------------------------------------- |
|
93 void TGlxSetCoefficientLayout::DoClearChanged() |
|
94 { |
|
95 // iCoefficient.ClearChanged(); |
|
96 } |
|
97 |