1 /* |
|
2 * Copyright (c) 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: Setting item type for "Add to album".* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CAMALBUMSETTINGITEM_H |
|
21 #define CAMALBUMSETTINGITEM_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <AknSettingItemList.h> |
|
25 |
|
26 |
|
27 class CAknSingleGraphicPopupMenuStyleListBox; |
|
28 class CCamStaticSettingsModel; |
|
29 |
|
30 /** |
|
31 * Setting item class similar to standard avkon CAknEnumeratedTextPopupSettingItem. |
|
32 * Allows the setting list array to be updated dynamically to show a currently selected album |
|
33 * name. The setting page displays "Yes" and "No options and displays an album selection list |
|
34 * popup if the user selects the "Yes" option. |
|
35 * |
|
36 */ |
|
37 |
|
38 class CCamAlbumSettingItem : public CAknEnumeratedTextPopupSettingItem |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Construct a list, storing in it a resource (to be read at 2nd stage construction) |
|
43 * and a reference to an externally owned integer - the value to be manipulated |
|
44 * @since 2.8 |
|
45 * @param aSettingItemId the setting item being constructed |
|
46 * @param aValue the current value of the item |
|
47 */ |
|
48 CCamAlbumSettingItem( TInt aSettingItemId, TInt& aValue ); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 * @since 2.8 |
|
53 */ |
|
54 ~CCamAlbumSettingItem(); |
|
55 |
|
56 public: // Functions from base classes |
|
57 |
|
58 /** |
|
59 * From MAknSettingPageObserver |
|
60 * Virtual Method called by framework to handle events in the |
|
61 * setting page. Used to launch an album selection list. |
|
62 * @since 2.8 |
|
63 * @param aSettingPage the setting page reporting the event |
|
64 * @param aEventType the type of event reported |
|
65 */ |
|
66 void HandleSettingPageEventL( CAknSettingPage* aSettingPage, |
|
67 TAknSettingPageEvent aEventType ); |
|
68 |
|
69 public: // New methods |
|
70 |
|
71 /** |
|
72 * Replace the "Yes" text in the setting list with the currently |
|
73 * selected capture album. Text in the setting page is unchanged. |
|
74 * @since 2.8 |
|
75 */ |
|
76 void UpdateListTextL(); |
|
77 |
|
78 private: // Functions from base classes |
|
79 |
|
80 /** |
|
81 * From CAknEnumeratedTextPopupSettingItem |
|
82 * Virtual Method called by framework to complete the construction. |
|
83 * Calls UpdateListTextL to set the list text when the item is first |
|
84 * constructed |
|
85 * @since 2.8 |
|
86 */ |
|
87 void CompleteConstructionL(); |
|
88 |
|
89 private: // New methods |
|
90 |
|
91 /** |
|
92 * Launches an album selection list |
|
93 * @since 2.8 |
|
94 * @return Whether or not an album was selected from the list |
|
95 */ |
|
96 void DisplayAlbumSelectionListL(); |
|
97 |
|
98 /** |
|
99 * Handle situations where the capture album does not exist or a request for |
|
100 * information on the capture album fails |
|
101 * @since 2.8 |
|
102 */ |
|
103 void HandleAlbumError(); |
|
104 |
|
105 private: // data |
|
106 |
|
107 // List of Album IDs - One for each unique album name |
|
108 TBool iAlbumExists; |
|
109 HBufC* iAlbumTitle; |
|
110 }; |
|
111 |
|
112 #endif // CAMALBUMSETTINGITEM_H |
|
113 |
|
114 // End of File |
|