1 /* |
|
2 * Copyright (c) 2008 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: Setting page class for Feedback settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 #include <ProfileSettingsView.rsg> |
|
22 #include <StringLoader.h> // For StringLoader |
|
23 #include <aknnotewrappers.h> // For CAknInformationNote |
|
24 |
|
25 // for power save mode handling |
|
26 #include <psmsettings.h> |
|
27 #include <psmsrvdomaincrkeys.h> |
|
28 #include <centralrepository.h> |
|
29 |
|
30 #include "CProfileFeedbackSettingPage.h" |
|
31 #include "ProfileSettingsView.hrh" |
|
32 |
|
33 |
|
34 // ============================ MEMBER FUNCTIONS =============================== |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CProfileFeedbackSettingPage::CProfileFeedbackSettingPage |
|
38 // C++ constructor can NOT contain any code, that might leave. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CProfileFeedbackSettingPage::CProfileFeedbackSettingPage( |
|
42 TInt aResourceID, |
|
43 MAknQueryValue& aQueryValue, |
|
44 TInt aIdentifier ) |
|
45 : CAknPopupSettingPage( aResourceID, aQueryValue ), |
|
46 iIdentifier( aIdentifier ) |
|
47 { |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CProfileFeedbackSettingPage::ConstructL |
|
52 // Symbian 2nd phase constructor can leave. |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 void CProfileFeedbackSettingPage::ConstructL() |
|
56 { |
|
57 CAknPopupSettingPage::ConstructL(); |
|
58 } |
|
59 |
|
60 // Destructor. |
|
61 CProfileFeedbackSettingPage::~CProfileFeedbackSettingPage() |
|
62 { |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CProfileFeedbackSettingPage::OkToExitL |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 TBool CProfileFeedbackSettingPage::OkToExitL( TBool aAccept ) |
|
70 { |
|
71 if( aAccept ) |
|
72 { |
|
73 TInt psm = EPsmsrvModeNormal; |
|
74 CRepository* cenrep = CRepository::NewLC( KCRUidPowerSaveMode ); |
|
75 cenrep->Get( KPsmCurrentMode, psm ); |
|
76 CleanupStack::PopAndDestroy( cenrep ); |
|
77 if( psm == EPsmsrvModePowerSave ) |
|
78 { |
|
79 HBufC* buf = StringLoader::LoadLC( R_PROFILE_TEXT_PSM_INFONOTE ); |
|
80 CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote( EFalse ); |
|
81 queryDialog->ExecuteLD( *buf ); |
|
82 CleanupStack::PopAndDestroy( buf ); |
|
83 } |
|
84 } |
|
85 return ETrue; |
|
86 } |
|
87 |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CProfileFeedbackSettingPage::OfferKeyEventL |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 TKeyResponse CProfileFeedbackSettingPage::OfferKeyEventL( |
|
94 const TKeyEvent& aKeyEvent, TEventCode aType ) |
|
95 { |
|
96 return CAknPopupSettingPage::OfferKeyEventL( aKeyEvent, aType ); |
|
97 } |
|
98 |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CProfileFeedbackSettingPage::HandlePointerEventL |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 void CProfileFeedbackSettingPage::HandlePointerEventL( |
|
105 const TPointerEvent& aPointerEvent ) |
|
106 { |
|
107 CAknPopupSettingPage::HandlePointerEventL( aPointerEvent ); |
|
108 } |
|
109 |
|
110 |
|
111 // End of File |
|