equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <hbeffect.h> |
|
20 |
|
21 // User includes |
|
22 #include "radiouiutilities.h" |
|
23 #include "radiologger.h" |
|
24 |
|
25 // Constants |
|
26 |
|
27 /*! |
|
28 * |
|
29 */ |
|
30 bool RadioUiUtilities::addEffects( QEffectList list ) |
|
31 { |
|
32 bool allAvailable = true; |
|
33 QEffectList added; |
|
34 foreach ( EffectInfo info, list ) { |
|
35 #ifdef USE_LAYOUT_FROM_E_DRIVE |
|
36 info.mPath.replace( QString( ":/" ), QString( "e:/radiotest/" ) ); |
|
37 #endif |
|
38 if ( HbEffect::add( info.mItem, info.mPath, info.mEvent ) ) { |
|
39 added.append( info ); |
|
40 } else { |
|
41 allAvailable = false; |
|
42 break; |
|
43 } |
|
44 } |
|
45 |
|
46 if ( !allAvailable ) { |
|
47 foreach ( const EffectInfo& info, added ) { |
|
48 HbEffect::remove( info.mItem, info.mPath, info.mEvent ); |
|
49 } |
|
50 } |
|
51 |
|
52 return allAvailable; |
|
53 } |