author | Matti Laitinen <matti.t.laitinen@nokia.com> |
Thu, 11 Feb 2010 15:52:57 +0200 | |
changeset 1 | 3ff3fecb12fe |
permissions | -rw-r--r-- |
1
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
1 |
/* |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
8 |
* |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
11 |
* |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
13 |
* |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
15 |
* |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
17 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
18 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
19 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
20 |
// INCLUDE FILES |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
21 |
#include "profiler_gui_samplersettingsviewdlg.h" |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
22 |
#include "profiler_gui_model.h" |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
23 |
#include "profiler_gui.hrh" |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
24 |
#include "profiler_gui_std.h" |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
25 |
#include <piprofilerui.rsg> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
26 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
27 |
#include <aknsettingitemlist.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
28 |
#include <caknmemoryselectionsettingitem.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
29 |
#include <aknlists.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
30 |
#include <akntitle.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
31 |
#include <aknnavi.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
32 |
#include <aknnavide.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
33 |
#include <stringloader.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
34 |
#include <aknnotewrappers.h> |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
35 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
36 |
// LITERALS |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
37 |
_LIT8(KCPUSamplerName, "gpp"); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
38 |
_LIT(KEmptySettingItem, ""); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
39 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
40 |
// ===================================== MEMBER FUNCTIONS ===================================== |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
41 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
42 |
CProfilerSamplerSettingsViewDlg* CProfilerSamplerSettingsViewDlg::NewL(TSamplerAttributes& aSettings) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
43 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
44 |
CProfilerSamplerSettingsViewDlg* self = new(ELeave) CProfilerSamplerSettingsViewDlg(aSettings); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
45 |
CleanupStack::PushL(self); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
46 |
self->ConstructL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
47 |
CleanupStack::Pop(self); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
48 |
return self; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
49 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
50 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
51 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
52 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
53 |
CProfilerSamplerSettingsViewDlg::~CProfilerSamplerSettingsViewDlg() |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
54 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
55 |
// restore default navi pane |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
56 |
if(iNaviContainer) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
57 |
iNaviContainer->Pop(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
58 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
59 |
if (iSettingItemArray) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
60 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
61 |
iSettingItemArray->ResetAndDestroy(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
62 |
delete iSettingItemArray; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
63 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
64 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
65 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
66 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
67 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
68 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
69 |
CProfilerSamplerSettingsViewDlg::CProfilerSamplerSettingsViewDlg(TSamplerAttributes& aSettings) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
70 |
: iSettings(aSettings) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
71 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
72 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
73 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
74 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
75 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
76 |
void CProfilerSamplerSettingsViewDlg::ConstructL() |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
77 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
78 |
// construct a menu bar |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
79 |
CAknDialog::ConstructL(R_PROFILER_SAMPLER_SETTINGS_MENUBAR); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
80 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
81 |
CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
82 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
83 |
// set empty navi pane label |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
84 |
iNaviContainer = static_cast<CAknNavigationControlContainer*>(sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi))); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
85 |
iNaviContainer->PushDefaultL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
86 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
87 |
// set title text |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
88 |
CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
89 |
tp->SetTextL( _L("Sampler Settings") ); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
90 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
91 |
iItemCount = iSettings.iItemCount; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
92 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
93 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
94 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
95 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
96 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
97 |
void CProfilerSamplerSettingsViewDlg::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
98 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
99 |
switch (aEventType) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
100 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
101 |
case EEventEnterKeyPressed: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
102 |
case EEventItemDoubleClicked: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
103 |
ShowSettingPageL(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
104 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
105 |
default: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
106 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
107 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
108 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
109 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
110 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
111 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
112 |
void CProfilerSamplerSettingsViewDlg::TabChangedL(TInt /*aIndex*/) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
113 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
114 |
iListBox->SetCurrentItemIndex(0); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
115 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
116 |
SetVisibilitiesOfSettingItemsL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
117 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
118 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
119 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
120 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
121 |
void CProfilerSamplerSettingsViewDlg::ProcessCommandL(TInt aCommandId) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
122 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
123 |
CAknDialog::ProcessCommandL(aCommandId); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
124 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
125 |
switch (aCommandId) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
126 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
127 |
case EProfilerGuiCmdSettingsChange: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
128 |
ShowSettingPageL(ETrue); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
129 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
130 |
case EProfilerGuiCmdSettingsExit: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
131 |
TryExitL(EAknCmdExit); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
132 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
133 |
default: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
134 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
135 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
136 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
137 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
138 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
139 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
140 |
TKeyResponse CProfilerSamplerSettingsViewDlg::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
141 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
142 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
143 |
return CAknDialog::OfferKeyEventL(aKeyEvent, aType); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
144 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
145 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
146 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
147 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
148 |
void CProfilerSamplerSettingsViewDlg::PreLayoutDynInitL() |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
149 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
150 |
iListBox = static_cast<CAknSettingStyleListBox*>( Control(EProfilerSamplerSettingItemList) ); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
151 |
iListBox->SetMopParent(this); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
152 |
iListBox->CreateScrollBarFrameL(ETrue); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
153 |
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
154 |
iListBox->SetListBoxObserver(this); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
155 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
156 |
iSettingItemArray = new(ELeave) CAknSettingItemArray(16, EFalse, 0); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
157 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
158 |
CTextListBoxModel* model = iListBox->Model(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
159 |
model->SetItemTextArray(iSettingItemArray); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
160 |
model->SetOwnershipType(ELbmDoesNotOwnItemArray); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
161 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
162 |
UpdateListBoxL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
163 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
164 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
165 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
166 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
167 |
TBool CProfilerSamplerSettingsViewDlg::OkToExitL(TInt aButtonId) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
168 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
169 |
// save all settings when exiting, only numeric values are needed to saved since copied from TBuf |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
170 |
for(TInt i(1);i<iItemCount+1;i++) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
171 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
172 |
if(iSettingItemArray->At(i)->IsHidden() == EFalse) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
173 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
174 |
switch(i) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
175 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
176 |
case 1: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
177 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
178 |
// check if settings value type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
179 |
if(iSettings.iSettingItem1.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
180 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
181 |
iSettings.iSettingItem1.iValue.Num(iItemBuf[i]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
182 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
183 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
184 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
185 |
case 2: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
186 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
187 |
// check if settings value type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
188 |
if(iSettings.iSettingItem2.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
189 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
190 |
iSettings.iSettingItem2.iValue.Num(iItemBuf[i]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
191 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
192 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
193 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
194 |
case 3: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
195 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
196 |
// check if settings value type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
197 |
if(iSettings.iSettingItem3.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
198 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
199 |
iSettings.iSettingItem3.iValue.Num(iItemBuf[i]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
200 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
201 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
202 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
203 |
case 4: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
204 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
205 |
// check if settings value type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
206 |
if(iSettings.iSettingItem4.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
207 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
208 |
iSettings.iSettingItem4.iValue.Num(iItemBuf[i]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
209 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
210 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
211 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
212 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
213 |
case 5: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
214 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
215 |
// check if settings value type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
216 |
if(iSettings.iSettingItem5.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
217 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
218 |
iSettings.iSettingItem5.iValue.Num(iItemBuf[i]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
219 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
220 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
221 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
222 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
223 |
case 6: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
224 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
225 |
// check if settings value type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
226 |
if(iSettings.iSettingItem6.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
227 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
228 |
iSettings.iSettingItem6.iValue.Num(iItemBuf[i]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
229 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
230 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
231 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
232 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
233 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
234 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
235 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
236 |
return CAknDialog::OkToExitL(aButtonId); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
237 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
238 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
239 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
240 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
241 |
void CProfilerSamplerSettingsViewDlg::ShowSettingPageL(TInt aCalledFromMenu) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
242 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
243 |
TInt listIndex = iListBox->CurrentItemIndex(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
244 |
TInt realIndex = iSettingItemArray->ItemIndexFromVisibleIndex(listIndex); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
245 |
CAknSettingItem* item = iSettingItemArray->At(realIndex); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
246 |
item->EditItemL(aCalledFromMenu); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
247 |
item->StoreL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
248 |
SetVisibilitiesOfSettingItemsL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
249 |
DrawNow(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
250 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
251 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
252 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
253 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
254 |
void CProfilerSamplerSettingsViewDlg::SetVisibilitiesOfSettingItemsL() |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
255 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
256 |
if (iSettingItemArray->Count() > 0) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
257 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
258 |
if(iSettings.iSampleRate > 0) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
259 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
260 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQuerySampleRate])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
261 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
262 |
else |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
263 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
264 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQuerySampleRate])->SetHidden(ETrue); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
265 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
266 |
if(iItemCount>0) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
267 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQueryItem1])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
268 |
if(iItemCount>1) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
269 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQueryItem2])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
270 |
if(iItemCount>2) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
271 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQueryItem3])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
272 |
if(iItemCount>3) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
273 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQueryItem4])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
274 |
if(iItemCount>4) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
275 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQueryItem5])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
276 |
if(iItemCount>5) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
277 |
((*iSettingItemArray)[EProfilerGuiGenericSamplerQueryItem6])->SetHidden(EFalse); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
278 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
279 |
iSettingItemArray->RecalculateVisibleIndicesL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
280 |
iListBox->HandleItemAdditionL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
281 |
iListBox->UpdateScrollBarsL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
282 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
283 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
284 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
285 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
286 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
287 |
void CProfilerSamplerSettingsViewDlg::UpdateListBoxL() |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
288 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
289 |
iSettingItemArray->ResetAndDestroy(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
290 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
291 |
// create items |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
292 |
TInt ordinal(0); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
293 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
294 |
AddSettingItemL(EProfilerGuiGenericSamplerQuerySampleRate, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
295 |
R_SAMPLE_RATE_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
296 |
R_SAMPLER_RATE_SETTING_PAGE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
297 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
298 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
299 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
300 |
if(iItemCount>0) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
301 |
AddSettingItemL(EProfilerGuiGenericSamplerQueryItem1, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
302 |
R_ITEM1_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
303 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
304 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
305 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
306 |
if(iItemCount>1) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
307 |
AddSettingItemL(EProfilerGuiGenericSamplerQueryItem2, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
308 |
R_ITEM2_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
309 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
310 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
311 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
312 |
if(iItemCount>2) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
313 |
AddSettingItemL(EProfilerGuiGenericSamplerQueryItem3, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
314 |
R_ITEM3_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
315 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
316 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
317 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
318 |
if(iItemCount>3) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
319 |
AddSettingItemL(EProfilerGuiGenericSamplerQueryItem4, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
320 |
R_ITEM4_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
321 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
322 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
323 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
324 |
if(iItemCount>4) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
325 |
AddSettingItemL(EProfilerGuiGenericSamplerQueryItem5, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
326 |
R_ITEM5_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
327 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
328 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
329 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
330 |
if(iItemCount>5) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
331 |
AddSettingItemL(EProfilerGuiGenericSamplerQueryItem6, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
332 |
R_ITEM6_SETTING_TITLE, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
333 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
334 |
NULL, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
335 |
ordinal++); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
336 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
337 |
SetVisibilitiesOfSettingItemsL(); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
338 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
339 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
340 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
341 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
342 |
CAknSettingItem* CProfilerSamplerSettingsViewDlg::GetSettingItemL(TSettingItem& aItem, TInt aIndex, TInt& aSettingPageResource) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
343 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
344 |
CAknSettingItem* settingItem = NULL; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
345 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
346 |
// set default setting page dialog style resource |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
347 |
aSettingPageResource = R_GENERIC_TEXT_SETTING_PAGE; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
348 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
349 |
// check if setting item type integer |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
350 |
if(aItem.iType == TSettingItem::ESettingItemTypeInt) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
351 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
352 |
TLex* lex = new TLex(aItem.iValue); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
353 |
// check if value valid |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
354 |
if(lex->Val(iItemBuf[aIndex]) != KErrNone) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
355 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
356 |
// if value not valid set to 0 |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
357 |
iItemBuf[aIndex] = 0; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
358 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
359 |
settingItem = new(ELeave) CAknIntegerEdwinSettingItem(aIndex, iItemBuf[aIndex]); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
360 |
aSettingPageResource = R_NUMERIC_SETTING_PAGE; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
361 |
delete lex; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
362 |
return settingItem; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
363 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
364 |
else // else manipulate as a text setting |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
365 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
366 |
settingItem = new(ELeave) CAknTextSettingItem(aIndex, aItem.iValue); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
367 |
settingItem->SetEmptyItemTextL(KEmptySettingItem); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
368 |
return settingItem; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
369 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
370 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
371 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
372 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
373 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
374 |
void CProfilerSamplerSettingsViewDlg::AddSettingItemL(TInt aId, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
375 |
TInt aTitleResource, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
376 |
TInt aSettingPageResource, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
377 |
TInt aAssociatedResource, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
378 |
TInt aOrdinal) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
379 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
380 |
// create a setting item |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
381 |
CAknSettingItem* settingItem = NULL; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
382 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
383 |
TBuf<KMaxSettingUITextLength> ptr; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
384 |
switch(aId) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
385 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
386 |
case EProfilerGuiGenericSamplerQuerySampleRate: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
387 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
388 |
settingItem = new (ELeave) CAknIntegerEdwinSettingItem(aId, iSettings.iSampleRate); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
389 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
390 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
391 |
case EProfilerGuiGenericSamplerQueryItem1: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
392 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
393 |
ptr.Copy(iSettings.iSettingItem1.iUIText); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
394 |
settingItem = GetSettingItemL(iSettings.iSettingItem1, aId, aSettingPageResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
395 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
396 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
397 |
case EProfilerGuiGenericSamplerQueryItem2: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
398 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
399 |
ptr.Copy(iSettings.iSettingItem2.iUIText); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
400 |
settingItem = GetSettingItemL(iSettings.iSettingItem2, aId, aSettingPageResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
401 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
402 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
403 |
case EProfilerGuiGenericSamplerQueryItem3: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
404 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
405 |
ptr.Copy(iSettings.iSettingItem3.iUIText); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
406 |
settingItem = GetSettingItemL(iSettings.iSettingItem3, aId, aSettingPageResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
407 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
408 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
409 |
case EProfilerGuiGenericSamplerQueryItem4: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
410 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
411 |
ptr.Copy(iSettings.iSettingItem4.iUIText); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
412 |
settingItem = GetSettingItemL(iSettings.iSettingItem4, aId, aSettingPageResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
413 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
414 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
415 |
case EProfilerGuiGenericSamplerQueryItem5: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
416 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
417 |
ptr.Copy(iSettings.iSettingItem5.iUIText); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
418 |
settingItem = GetSettingItemL(iSettings.iSettingItem5, aId, aSettingPageResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
419 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
420 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
421 |
case EProfilerGuiGenericSamplerQueryItem6: |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
422 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
423 |
ptr.Copy(iSettings.iSettingItem6.iUIText); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
424 |
settingItem = GetSettingItemL(iSettings.iSettingItem6, aId, aSettingPageResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
425 |
break; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
426 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
427 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
428 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
429 |
CleanupStack::PushL(settingItem); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
430 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
431 |
// get title text |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
432 |
HBufC* itemTitle; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
433 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
434 |
if( ptr.Compare(KNullDesC) == 0 ) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
435 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
436 |
itemTitle = StringLoader::LoadLC(aTitleResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
437 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
438 |
// special case: check if CPU sampler |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
439 |
if(iSettings.iShortName.CompareF(KCPUSamplerName) == 0) |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
440 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
441 |
// change setting page using different value range, since > 10000 ms rates are too big |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
442 |
aSettingPageResource = R_CPU_SAMPLER_RATE_SETTING_PAGE; |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
443 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
444 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
445 |
// construct the setting item |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
446 |
settingItem->ConstructL(EFalse, aOrdinal, *itemTitle, NULL, aSettingPageResource, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
447 |
EAknCtPopupSettingList, NULL, aAssociatedResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
448 |
// append the setting item to settingitem array |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
449 |
iSettingItemArray->InsertL(aOrdinal, settingItem); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
450 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
451 |
CleanupStack::PopAndDestroy(); //itemTitle |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
452 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
453 |
else |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
454 |
{ |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
455 |
// construct the setting item |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
456 |
settingItem->ConstructL(EFalse, aOrdinal, ptr, NULL, aSettingPageResource, |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
457 |
EAknCtPopupSettingList, NULL, aAssociatedResource); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
458 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
459 |
// append the setting item to settingitem array |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
460 |
iSettingItemArray->InsertL(aOrdinal, settingItem); |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
461 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
462 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
463 |
CleanupStack::Pop(); //settingItem |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
464 |
} |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
465 |
|
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
466 |
// -------------------------------------------------------------------------------------------- |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
467 |
// End of File |
3ff3fecb12fe
Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
468 |