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 Vibra 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 "CProfileVibraSettingPage.h" |
|
31 #include "ProfileSettingsView.hrh" |
|
32 |
|
33 |
|
34 // ============================ MEMBER FUNCTIONS =============================== |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CProfileVibraSettingPage::CProfileVibraSettingPage |
|
38 // C++ constructor can NOT contain any code, that might leave. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CProfileVibraSettingPage::CProfileVibraSettingPage( |
|
42 TInt aResourceID, MAknQueryValue& aQueryValue ) |
|
43 : CAknPopupSettingPage( aResourceID, aQueryValue ) |
|
44 { |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CProfileVibraSettingPage::ConstructL |
|
49 // Symbian 2nd phase constructor can leave. |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 void CProfileVibraSettingPage::ConstructL() |
|
53 { |
|
54 CAknPopupSettingPage::ConstructL(); |
|
55 } |
|
56 |
|
57 // Destructor. |
|
58 CProfileVibraSettingPage::~CProfileVibraSettingPage() |
|
59 { |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CProfileFeedbackSettingPage::OkToExitL |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 TBool CProfileVibraSettingPage::OkToExitL( TBool aAccept ) |
|
67 { |
|
68 if( aAccept ) |
|
69 { |
|
70 TInt psm = EPsmsrvModeNormal; |
|
71 CRepository* cenrep = CRepository::NewLC( KCRUidPowerSaveMode ); |
|
72 cenrep->Get( KPsmCurrentMode, psm ); |
|
73 CleanupStack::PopAndDestroy( cenrep ); |
|
74 if( psm == EPsmsrvModePowerSave ) |
|
75 { |
|
76 HBufC* buf = StringLoader::LoadLC( R_PROFILE_TEXT_PSM_INFONOTE ); |
|
77 CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote( EFalse ); |
|
78 queryDialog->ExecuteLD( *buf ); |
|
79 CleanupStack::PopAndDestroy( buf ); |
|
80 } |
|
81 } |
|
82 return ETrue; |
|
83 } |
|
84 |
|
85 // End of File |
|