1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PERFMON_SETTINGSVIEWDLG_H |
|
20 #define PERFMON_SETTINGSVIEWDLG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknDialog.h> |
|
24 #include <eiklbo.h> |
|
25 #include <AknTabObserver.h> |
|
26 #include <akntabgrp.h> |
|
27 #include <aknsettingitemlist.h> |
|
28 #include <akncheckboxsettingpage.h> |
|
29 |
|
30 #include "perfmon_model.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CAknSettingItemArray; |
|
35 class CAknSettingStyleListBox; |
|
36 class CAknNavigationControlContainer; |
|
37 class CAknNavigationDecorator; |
|
38 class CAknTabGroup; |
|
39 class TPerfMonSettings; |
|
40 class CSelectionItemList; |
|
41 |
|
42 |
|
43 // CLASS DEFINITIONS |
|
44 |
|
45 class CPerfMonSettingsViewDlg : public CAknDialog, public MEikListBoxObserver, public MAknTabObserver |
|
46 { |
|
47 public: |
|
48 static CPerfMonSettingsViewDlg* NewL(TPerfMonSettings& aSettings); |
|
49 virtual ~CPerfMonSettingsViewDlg(); |
|
50 |
|
51 public: // From MEikListBoxObserver |
|
52 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
53 |
|
54 public: // From MAknTabObserver |
|
55 void TabChangedL(TInt aIndex); |
|
56 |
|
57 public: // From CAknDialog |
|
58 void ProcessCommandL(TInt aCommandId); |
|
59 |
|
60 protected: // From CEikDialog |
|
61 TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType); |
|
62 void PreLayoutDynInitL(); |
|
63 TBool OkToExitL(TInt aButtonId); |
|
64 |
|
65 private: // New methods |
|
66 void ShowSettingPageL(TBool aCalledFromMenu); |
|
67 void SetVisibilitiesOfSettingItemsL(); |
|
68 void UpdateListBoxL(); |
|
69 void AddSettingItemL(TInt aId, TInt aTitleResource, TInt aSettingPageResource, TInt aAssociatedResource, TInt aOrdinal); |
|
70 |
|
71 private: // Constructors |
|
72 CPerfMonSettingsViewDlg(TPerfMonSettings& aSettings); |
|
73 void ConstructL(); |
|
74 |
|
75 private: // Data |
|
76 CAknSettingItemArray* iSettingItemArray; |
|
77 CAknSettingStyleListBox* iListBox; |
|
78 CAknNavigationControlContainer* iNaviContainer; |
|
79 CAknNavigationDecorator* iDecoratedTabGroup; |
|
80 CAknTabGroup* iTabGroup; |
|
81 TPerfMonSettings& iSettings; |
|
82 }; |
|
83 |
|
84 |
|
85 class CSourceSelectionCheckBoxSettingItem : public CAknSettingItem |
|
86 { |
|
87 public: |
|
88 CSourceSelectionCheckBoxSettingItem( TInt aIdentifier, TPerfMonSources& aMemoryInUse ); |
|
89 virtual ~CSourceSelectionCheckBoxSettingItem(); |
|
90 |
|
91 protected: |
|
92 void CompleteConstructionL(); |
|
93 void StoreL(); |
|
94 void LoadL(); |
|
95 const TDesC& SettingTextL(); |
|
96 void EditItemL( TBool aCalledFromMenu ); |
|
97 void HandleSettingPageEventL( CAknSettingPage* aSettingPage, TAknSettingPageEvent aEventType ); |
|
98 |
|
99 private: |
|
100 void AddNewItemToArrayL(const TDesC& aLabel); |
|
101 |
|
102 private: |
|
103 CSelectionItemList* iItemArray; |
|
104 HBufC* iSettingText; |
|
105 TPerfMonSources& iExternalSources; |
|
106 }; |
|
107 |
|
108 |
|
109 class CSourceSelectionCheckBoxSettingPage : public CAknCheckBoxSettingPage |
|
110 { |
|
111 public: |
|
112 CSourceSelectionCheckBoxSettingPage( TInt aResourceID, CSelectionItemList* aItemArray ); |
|
113 public: // New functions |
|
114 void UpdateCba(); |
|
115 }; |
|
116 |
|
117 |
|
118 #endif |
|
119 |
|
120 // End of File |
|
121 |
|