22 #include <eikmenub.h> |
22 #include <eikmenub.h> |
23 #include <AknUtils.h> |
23 #include <AknUtils.h> |
24 #include <hlplch.h> |
24 #include <hlplch.h> |
25 #include <data_caging_path_literals.hrh> |
25 #include <data_caging_path_literals.hrh> |
26 #include <avkon.rsg> |
26 #include <avkon.rsg> |
|
27 #include <akntitle.h> |
27 #include <mpxuser.h> |
28 #include <mpxuser.h> |
|
29 #include <mpxmusicplayerviewplugin.hrh> |
28 |
30 |
29 #include <mpxplaybackutility.h> |
31 #include <mpxplaybackutility.h> |
30 #include <mpxaudioeffectsview.rsg> |
32 #include <mpxaudioeffectsview.rsg> |
31 #include <mpxviewutility.h> |
33 #include <mpxviewutility.h> |
32 #include "mpxaudioeffectengine.h" |
34 #include "mpxaudioeffectengine.h" |
37 #include "mpxaudioeffects.hrh" |
39 #include "mpxaudioeffects.hrh" |
38 |
40 |
39 |
41 |
40 // CONSTANTS |
42 // CONSTANTS |
41 _LIT( KMPXAudioEffectsRscPath, "mpxaudioeffectsview.rsc" ); |
43 _LIT( KMPXAudioEffectsRscPath, "mpxaudioeffectsview.rsc" ); |
42 |
44 _LIT(KEmptyTitle, " "); |
43 |
45 |
44 // ======== MEMBER FUNCTIONS ======== |
46 // ======== MEMBER FUNCTIONS ======== |
45 |
47 |
46 // --------------------------------------------------------------------------- |
48 // --------------------------------------------------------------------------- |
47 // C++ default constructor can NOT contain any code, that |
49 // C++ default constructor can NOT contain any code, that |
72 iPlaybackUtility = MMPXPlaybackUtility::UtilityL( KPbModeDefault ); |
74 iPlaybackUtility = MMPXPlaybackUtility::UtilityL( KPbModeDefault ); |
73 |
75 |
74 iModel = CMPXAudioEffectsModel::NewL( *iPlaybackUtility ); |
76 iModel = CMPXAudioEffectsModel::NewL( *iPlaybackUtility ); |
75 |
77 |
76 iViewUtility = MMPXViewUtility::UtilityL(); |
78 iViewUtility = MMPXViewUtility::UtilityL(); |
|
79 iViewUtility->AddObserverL(this); |
|
80 iGoPreviousView = EFalse; |
77 } |
81 } |
78 |
82 |
79 // --------------------------------------------------------------------------- |
83 // --------------------------------------------------------------------------- |
80 // Two-phased constructor. |
84 // Two-phased constructor. |
81 // --------------------------------------------------------------------------- |
85 // --------------------------------------------------------------------------- |
203 AppUi()->AddToStackL( *this, iContainer ); |
209 AppUi()->AddToStackL( *this, iContainer ); |
204 } |
210 } |
205 } |
211 } |
206 |
212 |
207 // ----------------------------------------------------------------------------- |
213 // ----------------------------------------------------------------------------- |
|
214 // CMPXAudioEffectsViewImp::HandleViewActivation |
|
215 // Handle view activation |
|
216 // ----------------------------------------------------------------------------- |
|
217 // |
|
218 void CMPXAudioEffectsViewImp::HandleViewActivation( |
|
219 const TUid& aCurrentViewType, |
|
220 const TUid& /*aPreviousViewType*/ ) |
|
221 { |
|
222 MPX_FUNC( "CMPXAudioEffectsViewImp::HandleViewActivation" ); |
|
223 if ( ( aCurrentViewType.iUid == KMPXPluginTypePlaybackUid ) && ( iGoPreviousView == EFalse ) ) |
|
224 { |
|
225 // It is view switching when launched from other applications |
|
226 // deactivate this view to avoid flickering |
|
227 // since this view is the current active view, it receives this event |
|
228 |
|
229 if ( iContainer ) |
|
230 { |
|
231 // set title to blank to avoid title flickering |
|
232 CAknTitlePane* title( static_cast<CAknTitlePane*> |
|
233 ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle )))); |
|
234 if ( title ) |
|
235 { |
|
236 title->SetTextL(KEmptyTitle); |
|
237 title->DrawNow(); |
|
238 } |
|
239 } |
|
240 |
|
241 DoDeactivate(); |
|
242 } |
|
243 } |
|
244 |
|
245 // ----------------------------------------------------------------------------- |
|
246 // CMPXAudioEffectsViewImp::HandleViewUpdate |
|
247 // ----------------------------------------------------------------------------- |
|
248 // |
|
249 void CMPXAudioEffectsViewImp::HandleViewUpdate( |
|
250 TUid /* aViewUid */, |
|
251 MMPXViewActivationObserver::TViewUpdateEvent /* aUpdateEvent */, |
|
252 TBool /* aLoaded */, |
|
253 TInt /* aData */) |
|
254 { |
|
255 // Do nothing, this should be handled by the AppUI |
|
256 } |
|
257 |
|
258 // ----------------------------------------------------------------------------- |
208 // CMPXAudioEffectsViewImp::DoDeactivate |
259 // CMPXAudioEffectsViewImp::DoDeactivate |
209 // (other items were commented in a header). |
260 // (other items were commented in a header). |
210 // ----------------------------------------------------------------------------- |
261 // ----------------------------------------------------------------------------- |
211 // |
262 // |
212 void CMPXAudioEffectsViewImp::DoDeactivate() |
263 void CMPXAudioEffectsViewImp::DoDeactivate() |