|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 memory selection setting item. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2MEMORYSELECTIONSETTINGITEM_H |
|
20 #define CPBK2MEMORYSELECTIONSETTINGITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknsettingitemlist.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CVPbkContactStoreUriArray; |
|
27 class CSelectionItemList; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Phonebook 2 memory selection setting item. |
|
33 */ |
|
34 NONSHARABLE_CLASS(CPbk2MemorySelectionSettingItem) : public CAknSettingItem |
|
35 { |
|
36 public: // Construction and destruction |
|
37 |
|
38 /** |
|
39 * Constructor. |
|
40 * |
|
41 * @param aSettingId Setting id. |
|
42 * @param aSupportedStores Array of supported |
|
43 * contact store URIs. |
|
44 * @param aSelectionItemList Selection item list. |
|
45 * @see CAknSettingItem |
|
46 */ |
|
47 CPbk2MemorySelectionSettingItem( |
|
48 TInt aSettingId, |
|
49 CVPbkContactStoreUriArray& aSupportedStores, |
|
50 CSelectionItemList& aSelectionItemList ); |
|
51 |
|
52 /** |
|
53 * Destructor |
|
54 */ |
|
55 ~CPbk2MemorySelectionSettingItem(); |
|
56 |
|
57 public: // Interface |
|
58 |
|
59 /** |
|
60 * Launches setting page. |
|
61 * |
|
62 * @return ETrue if OK pressed, EFalse if Cancel pressed. |
|
63 */ |
|
64 TBool EditItemL(); |
|
65 |
|
66 /** |
|
67 * Restores UI state. |
|
68 */ |
|
69 void RestoreStateL(); |
|
70 |
|
71 private: // From CAknSettingItem |
|
72 void CompleteConstructionL(); |
|
73 void EditItemL( |
|
74 TBool aCalledFromMenu ); |
|
75 void HandleSettingPageEventL( |
|
76 CAknSettingPage* aSettingPage, |
|
77 TAknSettingPageEvent aEventType ); |
|
78 void StoreL(); |
|
79 void LoadL(); |
|
80 const TDesC& SettingTextL(); |
|
81 |
|
82 private: // Implementation |
|
83 void UpdateSettingTextL(); |
|
84 |
|
85 private: // Data |
|
86 /// Ref: Array of supported contact store URIs |
|
87 CVPbkContactStoreUriArray& iSupportedStores; |
|
88 /// Ref: Selection item list |
|
89 CSelectionItemList& iSelectionItemList; |
|
90 /// Own: Setting text |
|
91 HBufC* iSettingText; |
|
92 /// Own: Setting text for several memories |
|
93 HBufC* iSeveralMemories; |
|
94 }; |
|
95 |
|
96 #endif // CPBK2MEMORYSELECTIONSETTINGITEM_H |
|
97 |
|
98 // End of File |