|
1 /* |
|
2 * Copyright (c) 2002-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 : Class looking after alarm fields for forms. |
|
15 * |
|
16 */ |
|
17 |
|
18 //debug |
|
19 #include "calendarui_debug.h" |
|
20 //User includes |
|
21 #include "CalenLunarSettingItem.h" |
|
22 #include "CalenKoreanLunarPlugin.h" |
|
23 |
|
24 //system includes |
|
25 #include <CalenKoreanLunarPluginData.rsg> |
|
26 #include <StringLoader.h> |
|
27 |
|
28 const TInt KLunarSettingItemId = 55000; //FIXME does this has to be globally unique ? |
|
29 |
|
30 // ======== MEMBER FUNCTIONS ======== |
|
31 |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // CCalenLunarSettingItem::NewLC() |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 CCalenLunarSettingItem* CCalenLunarSettingItem::NewLC( TInt aOrdinal, |
|
38 CCalenKoreanLunarPlugin& aPlugin ) |
|
39 { |
|
40 TRACE_ENTRY_POINT; |
|
41 |
|
42 CCalenLunarSettingItem* self = new (ELeave) CCalenLunarSettingItem( aPlugin ); |
|
43 CleanupStack::PushL(self); |
|
44 // Construct setting item with parametrized values |
|
45 HBufC* itemTitle = StringLoader::LoadLC(R_CALEN_LUNAR_SETTING_TITLE2); |
|
46 self->ConstructL( EFalse, aOrdinal, *itemTitle, NULL, |
|
47 R_CALEN_LUNAR_SETTING_PAGE, EAknCtPopupSettingList, |
|
48 NULL, R_CALEN_LUNAR_SETTING_TEXTS); |
|
49 CleanupStack::PopAndDestroy( itemTitle ); |
|
50 // no pop, because this is NewLC |
|
51 |
|
52 TRACE_EXIT_POINT; |
|
53 return self; |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // CCalenLunarSettingItem::CCalenLunarSettingItem() |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 CCalenLunarSettingItem::CCalenLunarSettingItem( CCalenKoreanLunarPlugin& aPlugin ) |
|
61 : CAknBinaryPopupSettingItem( KLunarSettingItemId, iLunarEnabled ), |
|
62 iPlugin( aPlugin ) |
|
63 { |
|
64 TRACE_ENTRY_POINT; |
|
65 TRACE_EXIT_POINT; |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 // CCalenLunarSettingItem::~CCalenLunarSettingItem() |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 CCalenLunarSettingItem::~CCalenLunarSettingItem() |
|
73 { |
|
74 TRACE_ENTRY_POINT; |
|
75 TRACE_EXIT_POINT; |
|
76 } |
|
77 |
|
78 // --------------------------------------------------------------------------- |
|
79 // CCalenLunarSettingItem::StoreL() |
|
80 // --------------------------------------------------------------------------- |
|
81 // |
|
82 void CCalenLunarSettingItem::StoreL() |
|
83 { |
|
84 TRACE_ENTRY_POINT; |
|
85 |
|
86 CAknBinaryPopupSettingItem::StoreL(); |
|
87 iPlugin.StoreEnabledStatusL( iLunarEnabled ); |
|
88 |
|
89 TRACE_EXIT_POINT; |
|
90 } |
|
91 |
|
92 // --------------------------------------------------------------------------- |
|
93 // CCalenLunarSettingItem::LoadL() |
|
94 // --------------------------------------------------------------------------- |
|
95 // |
|
96 void CCalenLunarSettingItem::LoadL() |
|
97 { |
|
98 TRACE_ENTRY_POINT; |
|
99 |
|
100 iLunarEnabled = iPlugin.LoadEnabledStatusL(); |
|
101 CAknBinaryPopupSettingItem::LoadL(); |
|
102 |
|
103 TRACE_EXIT_POINT; |
|
104 } |
|
105 |
|
106 // End of file |