|
1 /* |
|
2 * Copyright (c) 2004 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 |
|
20 |
|
21 // INCLUDES |
|
22 #include "createMceTestValueSettingsDialog.h" |
|
23 |
|
24 // CONSTANTS |
|
25 |
|
26 const TInt KBufLength = 100; |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS ============================== |
|
29 |
|
30 // ---------------------------------------------------------------------------- |
|
31 // CCreateMceValueSettingsDialog::CCreateMceValueSettingsDialog( ) |
|
32 // . |
|
33 // ---------------------------------------------------------------------------- |
|
34 // |
|
35 CCreateMceValueSettingsDialog::CCreateMceValueSettingsDialog( |
|
36 CMCETestUIEngine& aEngine): |
|
37 iEngine(aEngine) |
|
38 |
|
39 { |
|
40 |
|
41 // No implementation required |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // CCreateMceValueSettingsDialog::PreLayoutDynInitL() |
|
46 // . |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 void CCreateMceValueSettingsDialog::PreLayoutDynInitL() |
|
50 { |
|
51 CAknForm::PreLayoutDynInitL(); |
|
52 |
|
53 CEikNumberEditor* jittersize = static_cast<CEikNumberEditor*>( |
|
54 Control( EMceValueSettingsJitterSize ) ); |
|
55 jittersize->SetNumber(iEngine.iJitterBufSize); |
|
56 |
|
57 CEikNumberEditor* jittertreshold = static_cast<CEikNumberEditor*>( |
|
58 Control( EMceValueSettingsJitterTreshold ) ); |
|
59 jittertreshold->SetNumber(iEngine.iJitterBufTreshold); |
|
60 |
|
61 CEikNumberEditor* jittertimeout = static_cast<CEikNumberEditor*>( |
|
62 Control( EMceValueSettingsJitterTimeout ) ); |
|
63 jittertimeout->SetNumber(iEngine.iJitterBufTimeout/1000); |
|
64 |
|
65 } |
|
66 |
|
67 // ---------------------------------------------------------------------------- |
|
68 // CCreateMceValueSettingsDialog::OkToExitL( TInt ) |
|
69 // . |
|
70 // ---------------------------------------------------------------------------- |
|
71 // |
|
72 |
|
73 TBool CCreateMceValueSettingsDialog::OkToExitL( TInt aKey ) |
|
74 { |
|
75 if ( aKey == EEikCmdCanceled ) |
|
76 { |
|
77 // Cancel pressed. Just exit. |
|
78 return ETrue; |
|
79 } |
|
80 |
|
81 CEikNumberEditor* jittersize = static_cast<CEikNumberEditor*>( |
|
82 Control( EMceValueSettingsJitterSize ) ); |
|
83 |
|
84 iEngine.iJitterBufSize = jittersize->Number(); |
|
85 |
|
86 CEikNumberEditor* jittertreshold = static_cast<CEikNumberEditor*>( |
|
87 Control( EMceValueSettingsJitterTreshold ) ); |
|
88 |
|
89 iEngine.iJitterBufTreshold = jittertreshold->Number(); |
|
90 |
|
91 CEikNumberEditor* jittertimeout = static_cast<CEikNumberEditor*>( |
|
92 Control( EMceValueSettingsJitterTimeout ) ); |
|
93 |
|
94 iEngine.iJitterBufTimeout = jittertimeout->Number()*1000; |
|
95 |
|
96 return ETrue; |
|
97 } |
|
98 |
|
99 // ---------------------------------------------------------------------------- |
|
100 // CCreateMceValueSettingsDialog::~CCreateMceValueSettingsDialog() |
|
101 // . |
|
102 // ---------------------------------------------------------------------------- |
|
103 // |
|
104 CCreateMceValueSettingsDialog::~CCreateMceValueSettingsDialog() |
|
105 { |
|
106 return; |
|
107 } |
|
108 |
|
109 // End of File |