|
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: Slideshow settings dialog implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef SHWSLIDESHWSETTINGSLIST_H |
|
23 #define SHWSLIDESHWSETTINGSLIST_H |
|
24 |
|
25 // EXTERNAL INCLUDES |
|
26 #include <eiklbo.h> // for MEikListBoxObserver |
|
27 #include <aknsettingitemlist.h> // for CAknSettingItem |
|
28 #include <MMGFetchVerifier.h> // for MMGFetchVerifier |
|
29 #include <caf/content.h> // for ContentAccess::CContent |
|
30 #include <caf/data.h> // for ContentAccess::CData |
|
31 |
|
32 // INTERNAL INCLUDES |
|
33 |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CRepository; |
|
37 class CShwSettingsModel; |
|
38 class TShwEffectInfo; |
|
39 |
|
40 /** |
|
41 * @author Loughlin Spollen |
|
42 * The slide show settings list - contained with the settings dialog |
|
43 * @lib shwslideshowengine.lib |
|
44 * @internal reviewed 08/06/2007 by Kimmo Hoikka |
|
45 */ |
|
46 NONSHARABLE_CLASS (CShwSlideShowSettingsList) : public CAknSettingItemList, |
|
47 public MMGFetchVerifier |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 /** |
|
51 * Symbian default constructor. |
|
52 * @param aShwSettings setting values for music state, default path |
|
53 * and track default effect ECOM plugin UID and effect index |
|
54 * within the effect ECOM plugin |
|
55 */ |
|
56 static CShwSlideShowSettingsList* NewL(CShwSettingsModel& aShwSettings); |
|
57 |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 ~CShwSlideShowSettingsList(); |
|
62 |
|
63 public: //from CAknSettingItemList |
|
64 |
|
65 // @ref CAknSettingItemList::CreateSettingItemL |
|
66 CAknSettingItem* CreateSettingItemL(TInt aIdentifier); |
|
67 |
|
68 // @ref CAknSettingItemList::HandleListBoxEventL |
|
69 void HandleListBoxEventL(CEikListBox* aListBox, |
|
70 TListBoxEvent aEventType); |
|
71 |
|
72 public: |
|
73 |
|
74 /** |
|
75 * Update the list box. |
|
76 * @param The List box item index to be updated |
|
77 * @param Whether the event originated from a key press or menu command |
|
78 */ |
|
79 void UpdateListBoxL(TInt aListBoxIndex, TInt aKeyEvent = EFalse); |
|
80 |
|
81 /** |
|
82 * Update the music on/off control and the coupled |
|
83 * music file name. |
|
84 */ |
|
85 void UpdateMusicStateL(); |
|
86 |
|
87 /** |
|
88 * Update the music file name and path |
|
89 */ |
|
90 void UpdateMusicFileNamePathL(); |
|
91 |
|
92 /** |
|
93 * Update the transition delay between images |
|
94 */ |
|
95 void UpdateTransDelayL(); |
|
96 |
|
97 /** |
|
98 * Update the transition effect between images |
|
99 */ |
|
100 void UpdateTransEffectL(TBool aKeyEvent); |
|
101 |
|
102 |
|
103 private: |
|
104 /** |
|
105 * C++ default constructor. |
|
106 * @param aShwSettings setting values for music state, default path |
|
107 * and track default effect ECOM plugin UID and effect index |
|
108 * within the effect ECOM plugin |
|
109 */ |
|
110 CShwSlideShowSettingsList(CShwSettingsModel& aShwSettings); |
|
111 |
|
112 /** |
|
113 * 2nd stage constructor |
|
114 */ |
|
115 void ConstructL(); |
|
116 |
|
117 |
|
118 private: |
|
119 |
|
120 |
|
121 /** |
|
122 * Launch MGFetch for filename fetch |
|
123 */ |
|
124 void FetchFileNameFromUserL(); |
|
125 |
|
126 /** |
|
127 * Remove the music settings and set the default setting |
|
128 * values |
|
129 */ |
|
130 void ResetMusicDefaultsL(); |
|
131 |
|
132 |
|
133 /** |
|
134 * Validate the DRM rights for the music track file |
|
135 * @return TBool ETrue if valid for track selection |
|
136 */ |
|
137 TBool ValidateDRML(); |
|
138 |
|
139 /** |
|
140 * Show error note |
|
141 * @param aResourceId resource id of text string |
|
142 */ |
|
143 void ShowErrorNoteL(TInt aResourceId) const; |
|
144 |
|
145 |
|
146 /** |
|
147 * Check if iFileName exists |
|
148 * @return ETrue if exists |
|
149 */ |
|
150 TBool FileNameExistsL(); |
|
151 |
|
152 /** |
|
153 * Change the state of the music enabled setting |
|
154 */ |
|
155 void SetMusicStateL(TBool aNewMusicState); |
|
156 |
|
157 /** |
|
158 * Change the direction/order of slide show play |
|
159 */ |
|
160 void SetPlayDirectionL(TBool aNewPlayDirection); |
|
161 |
|
162 /** |
|
163 * Ask for user confirmation of a given query using a dialog |
|
164 * @param aQueryResourceId The query resource string ID |
|
165 * @return True if the user confirmed the query, otherwise false |
|
166 */ |
|
167 TBool ConfirmationQueryL(TInt aQueryStrId); |
|
168 |
|
169 /** |
|
170 * Check if the only files that can be played are DRM protected |
|
171 * @return ETrue if the only file that can be played are DRM protected |
|
172 * otherwise EFalse |
|
173 */ |
|
174 TBool PlayOnlyDRMProtectedFilesL(); |
|
175 |
|
176 /** |
|
177 * Read the values present in rss file and do required conversion |
|
178 * @param aResourceId resource string ID |
|
179 * @return converted value |
|
180 */ |
|
181 HBufC* ReadLBufStringL(const TInt aResourceId); |
|
182 |
|
183 private: // from MMGFetchVerifier |
|
184 |
|
185 /** |
|
186 * @ref MMGFetchVerifier::VerifySelectionL |
|
187 */ |
|
188 TBool VerifySelectionL(const MDesCArray* aSelectedFiles); |
|
189 |
|
190 private: //data |
|
191 |
|
192 class CShwTransEffectEnumPopupSettingItem; |
|
193 class CShwTransEffectBinaryPopupSettingItem; |
|
194 // Add our own setting page and item to fix |
|
195 // EEBD-79UL8Q - "no naviscroll support in slideshow settings" |
|
196 class CShwSliderSettingPage; |
|
197 class CShwSliderSettingItem; |
|
198 |
|
199 // Music On/Off Setting |
|
200 TBool iMusicState; |
|
201 |
|
202 //Play direction |
|
203 TBool iPlayDirection; |
|
204 |
|
205 // Number of transition effects |
|
206 TUint iEffectsCount; |
|
207 |
|
208 // Array of Transition effects |
|
209 RArray<TShwEffectInfo> iEffects; |
|
210 |
|
211 // Music filename Setting |
|
212 RBuf iMusicNamePath; |
|
213 |
|
214 // The transition delay between images |
|
215 TInt iTransDelay; |
|
216 |
|
217 // Not Owned: Slideshow settings |
|
218 CShwSettingsModel& iShwSettings; |
|
219 |
|
220 // Owned: The Central Repository |
|
221 CRepository* iRepository; |
|
222 |
|
223 }; |
|
224 |
|
225 #endif // SHWSLIDESHWSETTINGSLIST_H |